@green-on-grey/ui-kit 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -71,12 +71,12 @@ function S({ onClose: e, label: t, className: n, children: r }) {
71
71
  }
72
72
  //#endregion
73
73
  //#region src/components/TopBar.tsx
74
- function C({ logo: e, name: t, home: r = "/", sections: i, Link: a, center: o, actions: s, avatar: l, profileMenu: u }) {
75
- let f = d(), [g, _] = v(!1), [y, b] = v(!1), x = h(() => b(!1), []), S = h(() => _(!1), []), C = c(y, x), w = i.map((e) => /* @__PURE__ */ p(a, {
74
+ function C({ logo: e, name: t, home: r = "/", sections: i, Link: a, center: o, actions: s, avatar: l, profileMenu: u, menu: f }) {
75
+ let g = d(), [_, y] = v(!1), [b, x] = v(!1), S = h(() => x(!1), []), C = h(() => y(!1), []), w = c(b, S), T = i.map((e) => /* @__PURE__ */ p(a, {
76
76
  href: e.href,
77
77
  className: e.active ? "on" : void 0,
78
78
  "aria-current": e.active ? "page" : void 0,
79
- onClick: x,
79
+ onClick: S,
80
80
  children: e.label
81
81
  }, e.key));
82
82
  return /* @__PURE__ */ m("div", {
@@ -95,8 +95,8 @@ function C({ logo: e, name: t, home: r = "/", sections: i, Link: a, center: o, a
95
95
  }),
96
96
  /* @__PURE__ */ p("nav", {
97
97
  className: "nav hide-m",
98
- "aria-label": f("topbar.sections"),
99
- children: w
98
+ "aria-label": g("topbar.sections"),
99
+ children: T
100
100
  }),
101
101
  o,
102
102
  /* @__PURE__ */ m("div", {
@@ -105,36 +105,40 @@ function C({ logo: e, name: t, home: r = "/", sections: i, Link: a, center: o, a
105
105
  s,
106
106
  /* @__PURE__ */ p("button", {
107
107
  className: "avatar",
108
- style: g ? { boxShadow: "0 0 0 2px var(--violet)" } : void 0,
108
+ style: _ ? { boxShadow: "0 0 0 2px var(--violet)" } : void 0,
109
109
  onClick: () => {
110
- b(!1), _((e) => !e);
110
+ x(!1), y((e) => !e);
111
111
  },
112
- "aria-label": f("topbar.profile"),
113
- "aria-expanded": g,
112
+ "aria-label": g("topbar.profile"),
113
+ "aria-expanded": _,
114
114
  children: l
115
115
  }),
116
116
  /* @__PURE__ */ m("div", {
117
117
  className: "burger",
118
- ref: C,
118
+ ref: w,
119
119
  children: [/* @__PURE__ */ p("button", {
120
- className: `iconbtn${y ? " on" : ""}`,
120
+ className: `iconbtn${b ? " on" : ""}`,
121
121
  onClick: () => {
122
- _(!1), b((e) => !e);
122
+ y(!1), x((e) => !e);
123
123
  },
124
- "aria-label": f("topbar.sections"),
125
- "aria-expanded": y,
124
+ "aria-label": f?.label ?? g("topbar.sections"),
125
+ "aria-expanded": b,
126
126
  "aria-controls": "nav-sections",
127
- children: /* @__PURE__ */ p(n, { name: y ? "x" : "menu" })
128
- }), y && /* @__PURE__ */ p("nav", {
127
+ children: /* @__PURE__ */ p(n, { name: b ? "x" : "menu" })
128
+ }), b && (f ? /* @__PURE__ */ p("div", {
129
129
  id: "nav-sections",
130
130
  className: "navmenu",
131
- "aria-label": f("topbar.sections"),
132
- children: w
133
- })]
131
+ children: f.render(S)
132
+ }) : /* @__PURE__ */ p("nav", {
133
+ id: "nav-sections",
134
+ className: "navmenu",
135
+ "aria-label": g("topbar.sections"),
136
+ children: T
137
+ }))]
134
138
  })
135
139
  ]
136
140
  }),
137
- g && u(S)
141
+ _ && u(C)
138
142
  ]
139
143
  });
140
144
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Switch","useToast","Icon","Modal","Markdown","Empty","Loading","useOutside","Avatar","useKitT","UIKIT_NS","Button","rest","cls","variant","size","className","IconButton","fill","on","label","Tabs","ref","useRef","i","items","it","value","to","e","onChange","Menu","onClose","useEffect","opener","TopBar","t","profileOpen","setProfileOpen","useState","sectionsOpen","setSectionsOpen","closeSections","useCallback","closeProfile","links","sections","Link","s","home","logo","name","center","actions","v","avatar","profileMenu","GitHubIcon","ToastProvider"],"sources":["../src/components/Button.tsx","../src/components/Tabs.tsx","../src/components/Menu.tsx","../src/components/TopBar.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from \"react\";\n\ntype Native = ButtonHTMLAttributes<HTMLButtonElement>;\n\n/** `button.btn` with its variants. The classes stay a legitimate way to use a\n * button (FTR.NAB.CMN-0005 tech, decision 1); the component is for new code. */\nexport function Button({ variant, size, className, type = \"button\", ...rest }: Native & {\n variant?: \"primary\" | \"ghost\" | \"danger\"; size?: \"sm\";\n}) {\n const cls = [\"btn\", variant, size, className].filter(Boolean).join(\" \");\n return <button type={type} className={cls} {...rest} />;\n}\n\n/** `button.iconbtn`: a button with an icon only, so the label is required. */\nexport function IconButton({ label, fill, on, className, type = \"button\", ...rest }: Omit<Native, \"aria-label\"> & {\n label: string; fill?: boolean; on?: boolean;\n}) {\n const cls = [\"iconbtn\", fill && \"fill\", on && \"on\", className].filter(Boolean).join(\" \");\n return <button type={type} className={cls} aria-label={label} {...rest} />;\n}\n","import { useRef, type KeyboardEvent, type ReactNode } from \"react\";\n\n/** `.tabs` with the keyboard of a tab list: arrows, Home and End move the choice. */\nexport function Tabs<K extends string>({ items, value, onChange, label }: {\n items: { key: K; label: ReactNode }[]; value: K; onChange: (key: K) => void; label?: string;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const onKey = (e: KeyboardEvent) => {\n const i = items.findIndex((it) => it.key === value);\n const to = e.key === \"ArrowRight\" ? (i + 1) % items.length\n : e.key === \"ArrowLeft\" ? (i - 1 + items.length) % items.length\n : e.key === \"Home\" ? 0 : e.key === \"End\" ? items.length - 1 : -1;\n if (to < 0) return;\n e.preventDefault();\n onChange(items[to].key);\n ref.current?.querySelectorAll<HTMLElement>('[role=\"tab\"]')[to]?.focus();\n };\n return (\n <div className=\"tabs\" role=\"tablist\" aria-label={label} ref={ref} onKeyDown={onKey}>\n {items.map((it) => (\n <button key={it.key} type=\"button\" role=\"tab\" aria-selected={it.key === value} tabIndex={it.key === value ? 0 : -1}\n className={it.key === value ? \"on\" : undefined} onClick={() => onChange(it.key)}>\n {it.label}\n </button>\n ))}\n </div>\n );\n}\n","import { useEffect, type ReactNode } from \"react\";\nimport { useOutside } from \"./ui\";\n\n/** `.menu`: a popover closed by Escape and by a click outside; it is mounted while\n * open. `onClose` must keep its identity between renders. What is inside\n * (sections `.sec`, lines `.line`, actions `.action`) belongs to the product. */\nexport function Menu({ onClose, label, className, children }: {\n onClose: () => void; label?: string; className?: string; children: ReactNode;\n}) {\n const ref = useOutside<HTMLDivElement>(true, onClose);\n // the focus returns to what opened the menu (CMP-05)\n useEffect(() => {\n const opener = document.activeElement as HTMLElement | null;\n return () => opener?.focus?.();\n }, []);\n return (\n <div className={`menu${className ? ` ${className}` : \"\"}`} role=\"dialog\" aria-label={label} ref={ref}>\n {children}\n </div>\n );\n}\n","import { useCallback, useState, type ReactNode } from \"react\";\nimport { useKitT } from \"../i18n\";\nimport { Icon } from \"./Icon\";\nimport { useOutside } from \"./ui\";\n\n/** The link of the product: the kit does not depend on a router (arch §4.2). */\nexport type LinkComponent = (props: {\n href: string; className?: string; onClick?: () => void; \"aria-current\"?: \"page\"; children: ReactNode;\n}) => ReactNode;\n\nexport interface TopBarSection { key: string; label: ReactNode; href: string; active: boolean }\n\n/** The top bar (FTR.NAB.CMN-0005 R5, design §4): the logo and the name, the\n * sections in a row and behind the burger on a phone, the actions of the product,\n * the avatar that opens the profile menu. The profile menu and the list of\n * sections are never open together. */\nexport function TopBar({ logo, name, home = \"/\", sections, Link, center, actions, avatar, profileMenu }: {\n logo: string; name: string; home?: string; sections: TopBarSection[]; Link: LinkComponent;\n /** Between the sections and the actions: the search of Hammurapi. */\n center?: ReactNode;\n /** Before the avatar. */\n actions?: ReactNode;\n avatar: ReactNode;\n profileMenu: (close: () => void) => ReactNode;\n}) {\n const t = useKitT();\n const [profileOpen, setProfileOpen] = useState(false);\n const [sectionsOpen, setSectionsOpen] = useState(false);\n const closeSections = useCallback(() => setSectionsOpen(false), []);\n const closeProfile = useCallback(() => setProfileOpen(false), []);\n const ref = useOutside<HTMLDivElement>(sectionsOpen, closeSections);\n const links = sections.map((s) => (\n <Link key={s.key} href={s.href} className={s.active ? \"on\" : undefined} aria-current={s.active ? \"page\" : undefined} onClick={closeSections}>\n {s.label}\n </Link>\n ));\n return (\n <div className=\"topbar\">\n <Link href={home} className=\"brand\">\n <img src={logo} alt=\"\" />\n <span className=\"hide-m\">{name}</span>\n </Link>\n <nav className=\"nav hide-m\" aria-label={t(\"topbar.sections\")}>{links}</nav>\n {center}\n <div className=\"top-actions\">\n {actions}\n <button className=\"avatar\" style={profileOpen ? { boxShadow: \"0 0 0 2px var(--violet)\" } : undefined}\n onClick={() => { setSectionsOpen(false); setProfileOpen((v) => !v); }} aria-label={t(\"topbar.profile\")} aria-expanded={profileOpen}>\n {avatar}\n </button>\n <div className=\"burger\" ref={ref}>\n <button className={`iconbtn${sectionsOpen ? \" on\" : \"\"}`} onClick={() => { setProfileOpen(false); setSectionsOpen((v) => !v); }}\n aria-label={t(\"topbar.sections\")} aria-expanded={sectionsOpen} aria-controls=\"nav-sections\">\n <Icon name={sectionsOpen ? \"x\" : \"menu\"} />\n </button>\n {sectionsOpen && <nav id=\"nav-sections\" className=\"navmenu\" aria-label={t(\"topbar.sections\")}>{links}</nav>}\n </div>\n </div>\n {profileOpen && profileMenu(closeProfile)}\n </div>\n );\n}\n"],"mappings":";;;;;AAMA,SAAgBW,EAAO,EAAE,YAAS,SAAM,cAAW,UAAO,UAAU,GAAGC,KAEpE;CACD,IAAMC,IAAM;EAAC;EAAOC;EAASC;EAAMC;CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACtE,OAAO,kBAAC,UAAD;EAAc;EAAM,WAAWH;EAAK,GAAID;CAAO,CAAA;AACxD;AAGA,SAAgBK,EAAW,EAAE,UAAO,SAAM,OAAI,cAAW,UAAO,UAAU,GAAGL,KAE1E;CACD,IAAMC,IAAM;EAAC;EAAWK,KAAQ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AAkB;KACK,CAAA;KACR,kBAAC,OAAD;MAAK,WAAU;MAAc;MAA7B,UAAA,CACE,kBAAC,UAAD;OAAQ,WAAW,UAAUf,IAAe,QAAQ;OAAM,eAAe;QAAyB,AAAvBF,EAAe,EAAK,GAAGG,GAAiB,MAAM,CAACa,CAAC;OAAG;OAC5H,cAAYlB,EAAE,iBAAiB;OAAG,iBAAeI;OAAc,iBAAc;OAC7E,UAAA,kBAACtC,GAAD,EAAM,MAAMsC,IAAe,MAAM,OAAS,CAAA;MACpC,CAAA,GACPA,KAAgB,kBAAC,OAAD;OAAK,IAAG;OAAe,WAAU;OAAU,cAAYJ,EAAE,iBAAiB;OAAI,UAAAS;MAAW,CAAA,CACvG;;IACF;;GACJR,KAAemB,EAAYZ,CAAY;EACrC;;AAET"}
1
+ {"version":3,"file":"index.js","names":["Switch","useToast","Icon","Modal","Markdown","Empty","Loading","useOutside","Avatar","useKitT","UIKIT_NS","Button","rest","cls","variant","size","className","IconButton","fill","on","label","Tabs","ref","useRef","i","items","it","value","to","e","onChange","Menu","onClose","useEffect","opener","TopBar","t","profileOpen","setProfileOpen","useState","sectionsOpen","setSectionsOpen","closeSections","useCallback","closeProfile","links","sections","Link","s","home","logo","name","center","actions","v","avatar","menu","profileMenu","GitHubIcon","ToastProvider"],"sources":["../src/components/Button.tsx","../src/components/Tabs.tsx","../src/components/Menu.tsx","../src/components/TopBar.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from \"react\";\n\ntype Native = ButtonHTMLAttributes<HTMLButtonElement>;\n\n/** `button.btn` with its variants. The classes stay a legitimate way to use a\n * button (FTR.NAB.CMN-0005 tech, decision 1); the component is for new code. */\nexport function Button({ variant, size, className, type = \"button\", ...rest }: Native & {\n variant?: \"primary\" | \"ghost\" | \"danger\"; size?: \"sm\";\n}) {\n const cls = [\"btn\", variant, size, className].filter(Boolean).join(\" \");\n return <button type={type} className={cls} {...rest} />;\n}\n\n/** `button.iconbtn`: a button with an icon only, so the label is required. */\nexport function IconButton({ label, fill, on, className, type = \"button\", ...rest }: Omit<Native, \"aria-label\"> & {\n label: string; fill?: boolean; on?: boolean;\n}) {\n const cls = [\"iconbtn\", fill && \"fill\", on && \"on\", className].filter(Boolean).join(\" \");\n return <button type={type} className={cls} aria-label={label} {...rest} />;\n}\n","import { useRef, type KeyboardEvent, type ReactNode } from \"react\";\n\n/** `.tabs` with the keyboard of a tab list: arrows, Home and End move the choice. */\nexport function Tabs<K extends string>({ items, value, onChange, label }: {\n items: { key: K; label: ReactNode }[]; value: K; onChange: (key: K) => void; label?: string;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const onKey = (e: KeyboardEvent) => {\n const i = items.findIndex((it) => it.key === value);\n const to = e.key === \"ArrowRight\" ? (i + 1) % items.length\n : e.key === \"ArrowLeft\" ? (i - 1 + items.length) % items.length\n : e.key === \"Home\" ? 0 : e.key === \"End\" ? items.length - 1 : -1;\n if (to < 0) return;\n e.preventDefault();\n onChange(items[to].key);\n ref.current?.querySelectorAll<HTMLElement>('[role=\"tab\"]')[to]?.focus();\n };\n return (\n <div className=\"tabs\" role=\"tablist\" aria-label={label} ref={ref} onKeyDown={onKey}>\n {items.map((it) => (\n <button key={it.key} type=\"button\" role=\"tab\" aria-selected={it.key === value} tabIndex={it.key === value ? 0 : -1}\n className={it.key === value ? \"on\" : undefined} onClick={() => onChange(it.key)}>\n {it.label}\n </button>\n ))}\n </div>\n );\n}\n","import { useEffect, type ReactNode } from \"react\";\nimport { useOutside } from \"./ui\";\n\n/** `.menu`: a popover closed by Escape and by a click outside; it is mounted while\n * open. `onClose` must keep its identity between renders. What is inside\n * (sections `.sec`, lines `.line`, actions `.action`) belongs to the product. */\nexport function Menu({ onClose, label, className, children }: {\n onClose: () => void; label?: string; className?: string; children: ReactNode;\n}) {\n const ref = useOutside<HTMLDivElement>(true, onClose);\n // the focus returns to what opened the menu (CMP-05)\n useEffect(() => {\n const opener = document.activeElement as HTMLElement | null;\n return () => opener?.focus?.();\n }, []);\n return (\n <div className={`menu${className ? ` ${className}` : \"\"}`} role=\"dialog\" aria-label={label} ref={ref}>\n {children}\n </div>\n );\n}\n","import { useCallback, useState, type ReactNode } from \"react\";\nimport { useKitT } from \"../i18n\";\nimport { Icon } from \"./Icon\";\nimport { useOutside } from \"./ui\";\n\n/** The link of the product: the kit does not depend on a router (arch §4.2). */\nexport type LinkComponent = (props: {\n href: string; className?: string; onClick?: () => void; \"aria-current\"?: \"page\"; children: ReactNode;\n}) => ReactNode;\n\nexport interface TopBarSection { key: string; label: ReactNode; href: string; active: boolean }\n\n/** The top bar (FTR.NAB.CMN-0005 R5, design §4): the logo and the name, the\n * sections in a row and behind the burger on a phone, the actions of the product,\n * the avatar that opens the profile menu. The profile menu and the list of\n * sections are never open together. A part of the product with its own\n * navigation (the administration) puts it behind the burger in place of the\n * sections: `menu`, with the side panel marked `in-burger`, hidden on a phone. */\nexport function TopBar({ logo, name, home = \"/\", sections, Link, center, actions, avatar, profileMenu, menu }: {\n logo: string; name: string; home?: string; sections: TopBarSection[]; Link: LinkComponent;\n /** Between the sections and the actions: the search of Hammurapi. */\n center?: ReactNode;\n /** Before the avatar. */\n actions?: ReactNode;\n avatar: ReactNode;\n profileMenu: (close: () => void) => ReactNode;\n /** The burger of a phone in place of the sections: the navigation of the current part of the product and\n * its name, which the burger is called by. */\n menu?: { label: string; render: (close: () => void) => ReactNode };\n}) {\n const t = useKitT();\n const [profileOpen, setProfileOpen] = useState(false);\n const [sectionsOpen, setSectionsOpen] = useState(false);\n const closeSections = useCallback(() => setSectionsOpen(false), []);\n const closeProfile = useCallback(() => setProfileOpen(false), []);\n const ref = useOutside<HTMLDivElement>(sectionsOpen, closeSections);\n const links = sections.map((s) => (\n <Link key={s.key} href={s.href} className={s.active ? \"on\" : undefined} aria-current={s.active ? \"page\" : undefined} onClick={closeSections}>\n {s.label}\n </Link>\n ));\n return (\n <div className=\"topbar\">\n <Link href={home} className=\"brand\">\n <img src={logo} alt=\"\" />\n <span className=\"hide-m\">{name}</span>\n </Link>\n <nav className=\"nav hide-m\" aria-label={t(\"topbar.sections\")}>{links}</nav>\n {center}\n <div className=\"top-actions\">\n {actions}\n <button className=\"avatar\" style={profileOpen ? { boxShadow: \"0 0 0 2px var(--violet)\" } : undefined}\n onClick={() => { setSectionsOpen(false); setProfileOpen((v) => !v); }} aria-label={t(\"topbar.profile\")} aria-expanded={profileOpen}>\n {avatar}\n </button>\n <div className=\"burger\" ref={ref}>\n <button className={`iconbtn${sectionsOpen ? \" on\" : \"\"}`} onClick={() => { setProfileOpen(false); setSectionsOpen((v) => !v); }}\n aria-label={menu?.label ?? t(\"topbar.sections\")} aria-expanded={sectionsOpen} aria-controls=\"nav-sections\">\n <Icon name={sectionsOpen ? \"x\" : \"menu\"} />\n </button>\n {sectionsOpen && (menu\n ? <div id=\"nav-sections\" className=\"navmenu\">{menu.render(closeSections)}</div>\n : <nav id=\"nav-sections\" className=\"navmenu\" aria-label={t(\"topbar.sections\")}>{links}</nav>)}\n </div>\n </div>\n {profileOpen && profileMenu(closeProfile)}\n </div>\n );\n}\n"],"mappings":";;;;;AAMA,SAAgBW,EAAO,EAAE,YAAS,SAAM,cAAW,UAAO,UAAU,GAAGC,KAEpE;CACD,IAAMC,IAAM;EAAC;EAAOC;EAASC;EAAMC;CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACtE,OAAO,kBAAC,UAAD;EAAc;EAAM,WAAWH;EAAK,GAAID;CAAO,CAAA;AACxD;AAGA,SAAgBK,EAAW,EAAE,UAAO,SAAM,OAAI,cAAW,UAAO,UAAU,GAAGL,KAE1E;CACD,IAAMC,IAAM;EAAC;EAAWK,KAAQ;EAAQC,KAAM;EAAMH;CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACvF,OAAO,kBAAC,UAAD;EAAc;EAAM,WAAWH;EAAK,cAAYO;EAAO,GAAIR;CAAO,CAAA;AAC3E;;;AChBA,SAAgBS,EAAuB,EAAE,UA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AG;OAC5H,cAAYE,GAAM,SAASpB,EAAE,iBAAiB;OAAG,iBAAeI;OAAc,iBAAc;OAC5F,UAAA,kBAACtC,GAAD,EAAM,MAAMsC,IAAe,MAAM,OAAS,CAAA;MACpC,CAAA,GACPA,MAAiBgB,IACd,kBAAC,OAAD;OAAK,IAAG;OAAe,WAAU;OAAW,UAAAA,EAAK,OAAOd,CAAa;MAAO,CAAA,IAC5E,kBAAC,OAAD;OAAK,IAAG;OAAe,WAAU;OAAU,cAAYN,EAAE,iBAAiB;OAAI,UAAAS;MAAW,CAAA,EAC1F;;IACF;;GACJR,KAAeoB,EAAYb,CAAY;EACrC;;AAET"}
@@ -87,6 +87,8 @@ export declare const resources: {
87
87
  save: string;
88
88
  notUtf8: string;
89
89
  rows: string;
90
+ source: string;
91
+ page: string;
90
92
  };
91
93
  };
92
94
  };
@@ -176,6 +178,8 @@ export declare const resources: {
176
178
  save: string;
177
179
  notUtf8: string;
178
180
  rows: string;
181
+ source: string;
182
+ page: string;
179
183
  };
180
184
  };
181
185
  };
@@ -265,6 +269,8 @@ export declare const resources: {
265
269
  save: string;
266
270
  notUtf8: string;
267
271
  rows: string;
272
+ source: string;
273
+ page: string;
268
274
  };
269
275
  };
270
276
  };
@@ -354,6 +360,8 @@ export declare const resources: {
354
360
  save: string;
355
361
  notUtf8: string;
356
362
  rows: string;
363
+ source: string;
364
+ page: string;
357
365
  };
358
366
  };
359
367
  };
@@ -443,6 +451,8 @@ export declare const resources: {
443
451
  save: string;
444
452
  notUtf8: string;
445
453
  rows: string;
454
+ source: string;
455
+ page: string;
446
456
  };
447
457
  };
448
458
  };
package/dist/locales.js CHANGED
@@ -85,7 +85,9 @@ var t = {
85
85
  tooLarge: "The file is too large to preview — download it",
86
86
  save: "Download {name}",
87
87
  notUtf8: "The file is not in UTF-8 — download it",
88
- rows: "Showing {shown} of {total, plural, one {# row} other {# rows}}"
88
+ rows: "Showing {shown} of {total, plural, one {# row} other {# rows}}",
89
+ source: "Code",
90
+ page: "Page"
89
91
  }
90
92
  }
91
93
  },
@@ -172,7 +174,9 @@ var t = {
172
174
  tooLarge: "Файл слишком большой для просмотра — скачайте его",
173
175
  save: "Скачать {name}",
174
176
  notUtf8: "Файл не в кодировке UTF-8 — скачайте его",
175
- rows: "Показаны {shown} из {total, plural, one {# строки} other {# строк}}"
177
+ rows: "Показаны {shown} из {total, plural, one {# строки} other {# строк}}",
178
+ source: "Код",
179
+ page: "Страница"
176
180
  }
177
181
  }
178
182
  },
@@ -259,7 +263,9 @@ var t = {
259
263
  tooLarge: "Die Datei ist zu groß für die Vorschau — bitte herunterladen",
260
264
  save: "{name} herunterladen",
261
265
  notUtf8: "Die Datei ist nicht in UTF-8 — bitte herunterladen",
262
- rows: "{shown} von {total, plural, one {# Zeile} other {# Zeilen}} angezeigt"
266
+ rows: "{shown} von {total, plural, one {# Zeile} other {# Zeilen}} angezeigt",
267
+ source: "Code",
268
+ page: "Seite"
263
269
  }
264
270
  }
265
271
  },
@@ -346,7 +352,9 @@ var t = {
346
352
  tooLarge: "El archivo es demasiado grande para la vista previa: descárguelo",
347
353
  save: "Descargar {name}",
348
354
  notUtf8: "El archivo no está en UTF-8: descárguelo",
349
- rows: "Se muestran {shown} de {total, plural, one {# fila} other {# filas}}"
355
+ rows: "Se muestran {shown} de {total, plural, one {# fila} other {# filas}}",
356
+ source: "Código",
357
+ page: "Página"
350
358
  }
351
359
  }
352
360
  },
@@ -433,7 +441,9 @@ var t = {
433
441
  tooLarge: "文件太大,无法预览,请下载",
434
442
  save: "下载 {name}",
435
443
  notUtf8: "文件不是 UTF-8 编码,请下载",
436
- rows: "显示 {total} 行中的 {shown} 行"
444
+ rows: "显示 {total} 行中的 {shown} 行",
445
+ source: "代码",
446
+ page: "页面"
437
447
  }
438
448
  }
439
449
  }
@@ -1 +1 @@
1
- {"version":3,"file":"locales.js","names":["loading","cancel","create","close","remove","agentName","topbar","chat","loading","cancel","create","close","remove","agentName","topbar","chat","loading","cancel","create","close","remove","agentName","topbar","chat","loading","cancel","create","close","remove","agentName","topbar","chat","UIKIT_NS","resources","\"delete\"","\"sections\"","\"profile\"","\"title\"","\"conversations\"","\"conversation\"","\"topics\"","\"archive\"","\"noTopics\"","\"newTopic\"","\"topicTitle\"","\"topicHint\"","\"loadOlder\"","\"emptyTitle\"","\"placeholder\"","\"send\"","\"attach\"","\"typing\"","\"moreSteps\"","\"hideSteps\"","\"unread\"","\"retry\"","\"tooLarge\"","\"stop\"","\"voice\"","\"hold\"","\"recording\"","\"review\"","\"notRecognized\"","\"micDenied\"","\"unsupported\"","\"start\"","\"done\"","\"recognizing\"","\"recordingNow\"","\"failed\"","\"confirm\"","\"text\"","\"approve\"","\"reject\"","\"wait\"","\"starting\"","\"queued\"","\"palette\"","\"commands\"","\"skills\"","\"noSkills\"","\"empty\"","\"unknownCommand\"","\"sendAsText\"","\"skillPlaceholder\"","\"context\"","\"meter\"","\"full\"","\"compact\"","\"reset\"","\"event\"","\"details\"","\"files\"","\"open\"","\"download\"","\"save\"","\"notUtf8\"","\"rows\""],"sources":["../src/locales/en.json","../src/locales/ru.json","../src/locales/de.json","../src/locales/es.json","../src/locales/zh.json","../src/locales/index.ts"],"sourcesContent":["{\n \"loading\": \"Loading…\",\n \"cancel\": \"Cancel\",\n \"create\": \"Create\",\n \"close\": \"Close\",\n \"delete\": \"Delete\",\n \"remove\": \"Remove\",\n \"agentName\": \"Agent name\",\n \"topbar\": {\n \"sections\": \"Sections\",\n \"profile\": \"Profile\"\n },\n \"chat\": {\n \"title\": \"Chat\",\n \"conversations\": \"Conversations\",\n \"conversation\": \"Conversation\",\n \"topics\": \"Topics\",\n \"archive\": \"Archive\",\n \"noTopics\": \"No topics yet\",\n \"newTopic\": \"New topic\",\n \"topicTitle\": \"Topic\",\n \"topicHint\": \"A topic has its own history and the same memory and space.\",\n \"loadOlder\": \"Earlier messages\",\n \"emptyTitle\": \"Hi, I am {name}\",\n \"placeholder\": \"Message {name}…\",\n \"send\": \"Send\",\n \"attach\": \"Attach files\",\n \"typing\": \"The agent is typing\",\n \"moreSteps\": \"{count, plural, one {# more step} other {# more steps}}\",\n \"hideSteps\": \"Hide steps\",\n \"unread\": \"{count, plural, one {# unread answer} other {# unread answers}}\",\n \"retry\": \"Retry\",\n \"tooLarge\": \"The file is too large.\",\n \"stop\": \"Stop\",\n \"voice\": {\n \"hold\": \"Hold to record\",\n \"stop\": \"Stop recording\",\n \"recording\": \"Recording… {seconds} s\",\n \"review\": \"Check the transcript before sending\",\n \"notRecognized\": \"The speech was not recognized\",\n \"micDenied\": \"No access to the microphone\",\n \"unsupported\": \"Voice input is not supported in this browser\",\n \"start\": \"Record a voice message\",\n \"done\": \"Stop\",\n \"recognizing\": \"Recognizing…\",\n \"recordingNow\": \"Recording\",\n \"failed\": \"The voice message could not be recognized\",\n \"retry\": \"Retry\"\n },\n \"confirm\": {\n \"title\": \"Confirm the action\",\n \"text\": \"The agent wants to perform: {action}\",\n \"approve\": \"Execute\",\n \"reject\": \"Reject\"\n },\n \"wait\": {\n \"starting\": \"The agent is starting…\",\n \"queued\": \"{count, plural, =0 {In the queue · you are next} one {In the queue · # ahead of you} other {In the queue · # ahead of you}}\"\n },\n \"palette\": {\n \"title\": \"Commands and skills\",\n \"commands\": \"Commands\",\n \"skills\": \"Skills\",\n \"noSkills\": \"No skills are granted to you\",\n \"empty\": \"Nothing found\"\n },\n \"unknownCommand\": \"Unknown command {name}\",\n \"sendAsText\": \"Send as text\",\n \"skillPlaceholder\": \"What to do with the skill?\",\n \"context\": {\n \"meter\": \"Context: {used} of {total} tokens ({pct}%)\",\n \"full\": \"Answers get more expensive and the agent may get confused.\",\n \"compact\": \"Compact\",\n \"reset\": \"Start over\"\n },\n \"event\": {\n \"details\": \"Summary\"\n },\n \"files\": {\n \"open\": \"Open {name}\",\n \"download\": \"Download\",\n \"failed\": \"Could not open the file\",\n \"tooLarge\": \"The file is too large to preview — download it\",\n \"save\": \"Download {name}\",\n \"notUtf8\": \"The file is not in UTF-8 — download it\",\n \"rows\": \"Showing {shown} of {total, plural, one {# row} other {# rows}}\"\n }\n }\n}\n","{\n \"loading\": \"Загрузка…\",\n \"cancel\": \"Отмена\",\n \"create\": \"Создать\",\n \"close\": \"Закрыть\",\n \"delete\": \"Удалить\",\n \"remove\": \"Убрать\",\n \"agentName\": \"Имя агента\",\n \"topbar\": {\n \"sections\": \"Разделы\",\n \"profile\": \"Профиль\"\n },\n \"chat\": {\n \"title\": \"Чат\",\n \"conversations\": \"Разговоры\",\n \"conversation\": \"Разговор\",\n \"topics\": \"Темы\",\n \"archive\": \"Архив\",\n \"noTopics\": \"Тем пока нет\",\n \"newTopic\": \"Новая тема\",\n \"topicTitle\": \"Тема\",\n \"topicHint\": \"У темы своя история, а память и пространство — те же.\",\n \"loadOlder\": \"Более ранние сообщения\",\n \"emptyTitle\": \"Привет, я {name}\",\n \"placeholder\": \"Сообщение для {name}…\",\n \"send\": \"Отправить\",\n \"attach\": \"Прикрепить файлы\",\n \"typing\": \"Агент печатает\",\n \"moreSteps\": \"{count, plural, one {ещё # шаг} few {ещё # шага} many {ещё # шагов} other {ещё # шага}}\",\n \"hideSteps\": \"Скрыть шаги\",\n \"unread\": \"{count, plural, one {# непрочитанный ответ} few {# непрочитанных ответа} many {# непрочитанных ответов} other {# непрочитанных ответа}}\",\n \"retry\": \"Повторить\",\n \"tooLarge\": \"Файл слишком большой.\",\n \"stop\": \"Остановить\",\n \"voice\": {\n \"hold\": \"Удерживайте для записи\",\n \"stop\": \"Остановить запись\",\n \"recording\": \"Запись… {seconds} с\",\n \"review\": \"Проверьте расшифровку перед отправкой\",\n \"notRecognized\": \"Речь не распознана\",\n \"micDenied\": \"Нет доступа к микрофону\",\n \"unsupported\": \"Голосовой ввод не поддерживается этим браузером\",\n \"start\": \"Записать голосом\",\n \"done\": \"Стоп\",\n \"recognizing\": \"Распознаём…\",\n \"recordingNow\": \"Запись\",\n \"failed\": \"Не удалось распознать голосовое сообщение\",\n \"retry\": \"Повторить\"\n },\n \"confirm\": {\n \"title\": \"Подтвердите действие\",\n \"text\": \"Агент хочет выполнить: {action}\",\n \"approve\": \"Выполнить\",\n \"reject\": \"Отклонить\"\n },\n \"wait\": {\n \"starting\": \"Агент запускается…\",\n \"queued\": \"{count, plural, =0 {В очереди · вы следующий} other {В очереди · перед вами #}}\"\n },\n \"palette\": {\n \"title\": \"Команды и скиллы\",\n \"commands\": \"Команды\",\n \"skills\": \"Скиллы\",\n \"noSkills\": \"Вам не выдан ни один скилл\",\n \"empty\": \"Ничего не найдено\"\n },\n \"unknownCommand\": \"Неизвестная команда {name}\",\n \"sendAsText\": \"Отправить как текст\",\n \"skillPlaceholder\": \"Что сделать по скиллу?\",\n \"context\": {\n \"meter\": \"Контекст: {used} из {total} токенов ({pct} %)\",\n \"full\": \"Ответы дорожают, агент может путаться.\",\n \"compact\": \"Сжать\",\n \"reset\": \"Начать заново\"\n },\n \"event\": {\n \"details\": \"Изложение\"\n },\n \"files\": {\n \"open\": \"Открыть {name}\",\n \"download\": \"Скачать\",\n \"failed\": \"Не удалось открыть файл\",\n \"tooLarge\": \"Файл слишком большой для просмотра — скачайте его\",\n \"save\": \"Скачать {name}\",\n \"notUtf8\": \"Файл не в кодировке UTF-8 — скачайте его\",\n \"rows\": \"Показаны {shown} из {total, plural, one {# строки} other {# строк}}\"\n }\n }\n}\n","{\n \"loading\": \"Wird geladen…\",\n \"cancel\": \"Abbrechen\",\n \"create\": \"Erstellen\",\n \"close\": \"Schließen\",\n \"delete\": \"Löschen\",\n \"remove\": \"Entfernen\",\n \"agentName\": \"Name des Agenten\",\n \"topbar\": {\n \"sections\": \"Bereiche\",\n \"profile\": \"Profil\"\n },\n \"chat\": {\n \"title\": \"Chat\",\n \"conversations\": \"Gespräche\",\n \"conversation\": \"Gespräch\",\n \"topics\": \"Themen\",\n \"archive\": \"Archiv\",\n \"noTopics\": \"Noch keine Themen\",\n \"newTopic\": \"Neues Thema\",\n \"topicTitle\": \"Thema\",\n \"topicHint\": \"Ein Thema hat einen eigenen Verlauf, aber dasselbe Gedächtnis und denselben Arbeitsbereich.\",\n \"loadOlder\": \"Frühere Nachrichten\",\n \"emptyTitle\": \"Hallo, ich bin {name}\",\n \"placeholder\": \"Nachricht an {name}…\",\n \"send\": \"Senden\",\n \"attach\": \"Dateien anhängen\",\n \"typing\": \"Der Agent schreibt\",\n \"moreSteps\": \"{count, plural, one {# weiterer Schritt} other {# weitere Schritte}}\",\n \"hideSteps\": \"Schritte ausblenden\",\n \"unread\": \"{count, plural, one {# ungelesene Antwort} other {# ungelesene Antworten}}\",\n \"retry\": \"Wiederholen\",\n \"tooLarge\": \"Die Datei ist zu groß.\",\n \"stop\": \"Stoppen\",\n \"voice\": {\n \"hold\": \"Zum Aufnehmen gedrückt halten\",\n \"stop\": \"Aufnahme beenden\",\n \"recording\": \"Aufnahme… {seconds} s\",\n \"review\": \"Prüfen Sie die Transkription vor dem Senden\",\n \"notRecognized\": \"Die Sprache wurde nicht erkannt\",\n \"micDenied\": \"Kein Zugriff auf das Mikrofon\",\n \"unsupported\": \"Spracheingabe wird von diesem Browser nicht unterstützt\",\n \"start\": \"Sprachnachricht aufnehmen\",\n \"done\": \"Stopp\",\n \"recognizing\": \"Wird erkannt…\",\n \"recordingNow\": \"Aufnahme\",\n \"failed\": \"Die Sprachnachricht konnte nicht erkannt werden\",\n \"retry\": \"Wiederholen\"\n },\n \"confirm\": {\n \"title\": \"Aktion bestätigen\",\n \"text\": \"Der Agent möchte ausführen: {action}\",\n \"approve\": \"Ausführen\",\n \"reject\": \"Ablehnen\"\n },\n \"wait\": {\n \"starting\": \"Der Agent startet…\",\n \"queued\": \"{count, plural, =0 {In der Warteschlange · Sie sind als Nächstes dran} other {In der Warteschlange · # vor Ihnen}}\"\n },\n \"palette\": {\n \"title\": \"Befehle und Skills\",\n \"commands\": \"Befehle\",\n \"skills\": \"Skills\",\n \"noSkills\": \"Ihnen ist kein Skill freigegeben\",\n \"empty\": \"Nichts gefunden\"\n },\n \"unknownCommand\": \"Unbekannter Befehl {name}\",\n \"sendAsText\": \"Als Text senden\",\n \"skillPlaceholder\": \"Was soll mit dem Skill getan werden?\",\n \"context\": {\n \"meter\": \"Kontext: {used} von {total} Tokens ({pct} %)\",\n \"full\": \"Antworten werden teurer, der Agent kann durcheinanderkommen.\",\n \"compact\": \"Komprimieren\",\n \"reset\": \"Neu beginnen\"\n },\n \"event\": {\n \"details\": \"Zusammenfassung\"\n },\n \"files\": {\n \"open\": \"{name} öffnen\",\n \"download\": \"Herunterladen\",\n \"failed\": \"Die Datei konnte nicht geöffnet werden\",\n \"tooLarge\": \"Die Datei ist zu groß für die Vorschau — bitte herunterladen\",\n \"save\": \"{name} herunterladen\",\n \"notUtf8\": \"Die Datei ist nicht in UTF-8 — bitte herunterladen\",\n \"rows\": \"{shown} von {total, plural, one {# Zeile} other {# Zeilen}} angezeigt\"\n }\n }\n}\n","{\n \"loading\": \"Cargando…\",\n \"cancel\": \"Cancelar\",\n \"create\": \"Crear\",\n \"close\": \"Cerrar\",\n \"delete\": \"Eliminar\",\n \"remove\": \"Quitar\",\n \"agentName\": \"Nombre del agente\",\n \"topbar\": {\n \"sections\": \"Secciones\",\n \"profile\": \"Perfil\"\n },\n \"chat\": {\n \"title\": \"Chat\",\n \"conversations\": \"Conversaciones\",\n \"conversation\": \"Conversación\",\n \"topics\": \"Temas\",\n \"archive\": \"Archivo\",\n \"noTopics\": \"Aún no hay temas\",\n \"newTopic\": \"Nuevo tema\",\n \"topicTitle\": \"Tema\",\n \"topicHint\": \"Un tema tiene su propio historial y la misma memoria y espacio.\",\n \"loadOlder\": \"Mensajes anteriores\",\n \"emptyTitle\": \"Hola, soy {name}\",\n \"placeholder\": \"Mensaje para {name}…\",\n \"send\": \"Enviar\",\n \"attach\": \"Adjuntar archivos\",\n \"typing\": \"El agente está escribiendo\",\n \"moreSteps\": \"{count, plural, one {# paso más} other {# pasos más}}\",\n \"hideSteps\": \"Ocultar pasos\",\n \"unread\": \"{count, plural, one {# respuesta sin leer} other {# respuestas sin leer}}\",\n \"retry\": \"Reintentar\",\n \"tooLarge\": \"El archivo es demasiado grande.\",\n \"stop\": \"Detener\",\n \"voice\": {\n \"hold\": \"Mantenga pulsado para grabar\",\n \"stop\": \"Detener la grabación\",\n \"recording\": \"Grabando… {seconds} s\",\n \"review\": \"Revise la transcripción antes de enviar\",\n \"notRecognized\": \"No se reconoció la voz\",\n \"micDenied\": \"Sin acceso al micrófono\",\n \"unsupported\": \"Este navegador no admite la entrada de voz\",\n \"start\": \"Grabar un mensaje de voz\",\n \"done\": \"Detener\",\n \"recognizing\": \"Reconociendo…\",\n \"recordingNow\": \"Grabando\",\n \"failed\": \"No se pudo reconocer el mensaje de voz\",\n \"retry\": \"Reintentar\"\n },\n \"confirm\": {\n \"title\": \"Confirme la acción\",\n \"text\": \"El agente quiere ejecutar: {action}\",\n \"approve\": \"Ejecutar\",\n \"reject\": \"Rechazar\"\n },\n \"wait\": {\n \"starting\": \"El agente se está iniciando…\",\n \"queued\": \"{count, plural, =0 {En cola · usted es el siguiente} other {En cola · # por delante}}\"\n },\n \"palette\": {\n \"title\": \"Comandos y skills\",\n \"commands\": \"Comandos\",\n \"skills\": \"Skills\",\n \"noSkills\": \"No tiene skills disponibles\",\n \"empty\": \"No se encontró nada\"\n },\n \"unknownCommand\": \"Comando desconocido {name}\",\n \"sendAsText\": \"Enviar como texto\",\n \"skillPlaceholder\": \"¿Qué hacer con el skill?\",\n \"context\": {\n \"meter\": \"Contexto: {used} de {total} tokens ({pct} %)\",\n \"full\": \"Las respuestas se encarecen y el agente puede confundirse.\",\n \"compact\": \"Compactar\",\n \"reset\": \"Empezar de nuevo\"\n },\n \"event\": {\n \"details\": \"Resumen\"\n },\n \"files\": {\n \"open\": \"Abrir {name}\",\n \"download\": \"Descargar\",\n \"failed\": \"No se pudo abrir el archivo\",\n \"tooLarge\": \"El archivo es demasiado grande para la vista previa: descárguelo\",\n \"save\": \"Descargar {name}\",\n \"notUtf8\": \"El archivo no está en UTF-8: descárguelo\",\n \"rows\": \"Se muestran {shown} de {total, plural, one {# fila} other {# filas}}\"\n }\n }\n}\n","{\n \"loading\": \"加载中…\",\n \"cancel\": \"取消\",\n \"create\": \"创建\",\n \"close\": \"关闭\",\n \"delete\": \"删除\",\n \"remove\": \"移除\",\n \"agentName\": \"智能体名称\",\n \"topbar\": {\n \"sections\": \"栏目\",\n \"profile\": \"个人资料\"\n },\n \"chat\": {\n \"title\": \"聊天\",\n \"conversations\": \"对话\",\n \"conversation\": \"对话\",\n \"topics\": \"话题\",\n \"archive\": \"归档\",\n \"noTopics\": \"暂无话题\",\n \"newTopic\": \"新话题\",\n \"topicTitle\": \"话题\",\n \"topicHint\": \"话题有独立的历史记录,记忆和空间与主对话相同。\",\n \"loadOlder\": \"更早的消息\",\n \"emptyTitle\": \"你好,我是 {name}\",\n \"placeholder\": \"给 {name} 发消息…\",\n \"send\": \"发送\",\n \"attach\": \"附加文件\",\n \"typing\": \"智能体正在输入\",\n \"moreSteps\": \"{count, plural, other {另外 # 个步骤}}\",\n \"hideSteps\": \"隐藏步骤\",\n \"unread\": \"{count} 条未读回复\",\n \"retry\": \"重试\",\n \"tooLarge\": \"文件太大。\",\n \"stop\": \"停止\",\n \"voice\": {\n \"hold\": \"按住录音\",\n \"stop\": \"停止录音\",\n \"recording\": \"录音中… {seconds} 秒\",\n \"review\": \"发送前请检查转写文本\",\n \"notRecognized\": \"未能识别语音\",\n \"micDenied\": \"无法访问麦克风\",\n \"unsupported\": \"此浏览器不支持语音输入\",\n \"start\": \"录制语音\",\n \"done\": \"停止\",\n \"recognizing\": \"正在识别…\",\n \"recordingNow\": \"录音中\",\n \"failed\": \"无法识别语音消息\",\n \"retry\": \"重试\"\n },\n \"confirm\": {\n \"title\": \"确认操作\",\n \"text\": \"代理想要执行:{action}\",\n \"approve\": \"执行\",\n \"reject\": \"拒绝\"\n },\n \"wait\": {\n \"starting\": \"代理正在启动…\",\n \"queued\": \"{count, plural, =0 {排队中 · 您是下一位} other {排队中 · 前面还有 # 位}}\"\n },\n \"palette\": {\n \"title\": \"命令和技能\",\n \"commands\": \"命令\",\n \"skills\": \"技能\",\n \"noSkills\": \"您没有可用的技能\",\n \"empty\": \"未找到\"\n },\n \"unknownCommand\": \"未知命令 {name}\",\n \"sendAsText\": \"作为文本发送\",\n \"skillPlaceholder\": \"用这个技能做什么?\",\n \"context\": {\n \"meter\": \"上下文:{used} / {total} 个令牌({pct}%)\",\n \"full\": \"回答变得更贵,代理可能会混淆。\",\n \"compact\": \"压缩\",\n \"reset\": \"重新开始\"\n },\n \"event\": {\n \"details\": \"摘要\"\n },\n \"files\": {\n \"open\": \"打开 {name}\",\n \"download\": \"下载\",\n \"failed\": \"无法打开文件\",\n \"tooLarge\": \"文件太大,无法预览,请下载\",\n \"save\": \"下载 {name}\",\n \"notUtf8\": \"文件不是 UTF-8 编码,请下载\",\n \"rows\": \"显示 {total} 行中的 {shown} 行\"\n }\n }\n}\n","import en from \"./en.json\";\nimport ru from \"./ru.json\";\nimport de from \"./de.json\";\nimport es from \"./es.json\";\nimport zh from \"./zh.json\";\n\n/** Strings of the components in the five languages of the products. A product adds\n * them to its i18next instance under the namespace `uikit`. */\nexport const resources = { en, ru, de, es, zh };\nexport type KitLanguage = keyof typeof resources;\nexport { UIKIT_NS } from \"../i18n\";\n"],"mappings":";;;AKQA,IAAaiC,IAAY;CAAE,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;AAAG"}
1
+ {"version":3,"file":"locales.js","names":["loading","cancel","create","close","remove","agentName","topbar","chat","loading","cancel","create","close","remove","agentName","topbar","chat","loading","cancel","create","close","remove","agentName","topbar","chat","loading","cancel","create","close","remove","agentName","topbar","chat","UIKIT_NS","resources","\"delete\"","\"sections\"","\"profile\"","\"title\"","\"conversations\"","\"conversation\"","\"topics\"","\"archive\"","\"noTopics\"","\"newTopic\"","\"topicTitle\"","\"topicHint\"","\"loadOlder\"","\"emptyTitle\"","\"placeholder\"","\"send\"","\"attach\"","\"typing\"","\"moreSteps\"","\"hideSteps\"","\"unread\"","\"retry\"","\"tooLarge\"","\"stop\"","\"voice\"","\"hold\"","\"recording\"","\"review\"","\"notRecognized\"","\"micDenied\"","\"unsupported\"","\"start\"","\"done\"","\"recognizing\"","\"recordingNow\"","\"failed\"","\"confirm\"","\"text\"","\"approve\"","\"reject\"","\"wait\"","\"starting\"","\"queued\"","\"palette\"","\"commands\"","\"skills\"","\"noSkills\"","\"empty\"","\"unknownCommand\"","\"sendAsText\"","\"skillPlaceholder\"","\"context\"","\"meter\"","\"full\"","\"compact\"","\"reset\"","\"event\"","\"details\"","\"files\"","\"open\"","\"download\"","\"save\"","\"notUtf8\"","\"rows\"","\"source\"","\"page\""],"sources":["../src/locales/en.json","../src/locales/ru.json","../src/locales/de.json","../src/locales/es.json","../src/locales/zh.json","../src/locales/index.ts"],"sourcesContent":["{\n \"loading\": \"Loading…\",\n \"cancel\": \"Cancel\",\n \"create\": \"Create\",\n \"close\": \"Close\",\n \"delete\": \"Delete\",\n \"remove\": \"Remove\",\n \"agentName\": \"Agent name\",\n \"topbar\": {\n \"sections\": \"Sections\",\n \"profile\": \"Profile\"\n },\n \"chat\": {\n \"title\": \"Chat\",\n \"conversations\": \"Conversations\",\n \"conversation\": \"Conversation\",\n \"topics\": \"Topics\",\n \"archive\": \"Archive\",\n \"noTopics\": \"No topics yet\",\n \"newTopic\": \"New topic\",\n \"topicTitle\": \"Topic\",\n \"topicHint\": \"A topic has its own history and the same memory and space.\",\n \"loadOlder\": \"Earlier messages\",\n \"emptyTitle\": \"Hi, I am {name}\",\n \"placeholder\": \"Message {name}…\",\n \"send\": \"Send\",\n \"attach\": \"Attach files\",\n \"typing\": \"The agent is typing\",\n \"moreSteps\": \"{count, plural, one {# more step} other {# more steps}}\",\n \"hideSteps\": \"Hide steps\",\n \"unread\": \"{count, plural, one {# unread answer} other {# unread answers}}\",\n \"retry\": \"Retry\",\n \"tooLarge\": \"The file is too large.\",\n \"stop\": \"Stop\",\n \"voice\": {\n \"hold\": \"Hold to record\",\n \"stop\": \"Stop recording\",\n \"recording\": \"Recording… {seconds} s\",\n \"review\": \"Check the transcript before sending\",\n \"notRecognized\": \"The speech was not recognized\",\n \"micDenied\": \"No access to the microphone\",\n \"unsupported\": \"Voice input is not supported in this browser\",\n \"start\": \"Record a voice message\",\n \"done\": \"Stop\",\n \"recognizing\": \"Recognizing…\",\n \"recordingNow\": \"Recording\",\n \"failed\": \"The voice message could not be recognized\",\n \"retry\": \"Retry\"\n },\n \"confirm\": {\n \"title\": \"Confirm the action\",\n \"text\": \"The agent wants to perform: {action}\",\n \"approve\": \"Execute\",\n \"reject\": \"Reject\"\n },\n \"wait\": {\n \"starting\": \"The agent is starting…\",\n \"queued\": \"{count, plural, =0 {In the queue · you are next} one {In the queue · # ahead of you} other {In the queue · # ahead of you}}\"\n },\n \"palette\": {\n \"title\": \"Commands and skills\",\n \"commands\": \"Commands\",\n \"skills\": \"Skills\",\n \"noSkills\": \"No skills are granted to you\",\n \"empty\": \"Nothing found\"\n },\n \"unknownCommand\": \"Unknown command {name}\",\n \"sendAsText\": \"Send as text\",\n \"skillPlaceholder\": \"What to do with the skill?\",\n \"context\": {\n \"meter\": \"Context: {used} of {total} tokens ({pct}%)\",\n \"full\": \"Answers get more expensive and the agent may get confused.\",\n \"compact\": \"Compact\",\n \"reset\": \"Start over\"\n },\n \"event\": {\n \"details\": \"Summary\"\n },\n \"files\": {\n \"open\": \"Open {name}\",\n \"download\": \"Download\",\n \"failed\": \"Could not open the file\",\n \"tooLarge\": \"The file is too large to preview — download it\",\n \"save\": \"Download {name}\",\n \"notUtf8\": \"The file is not in UTF-8 — download it\",\n \"rows\": \"Showing {shown} of {total, plural, one {# row} other {# rows}}\",\n \"source\": \"Code\",\n \"page\": \"Page\"\n }\n }\n}\n","{\n \"loading\": \"Загрузка…\",\n \"cancel\": \"Отмена\",\n \"create\": \"Создать\",\n \"close\": \"Закрыть\",\n \"delete\": \"Удалить\",\n \"remove\": \"Убрать\",\n \"agentName\": \"Имя агента\",\n \"topbar\": {\n \"sections\": \"Разделы\",\n \"profile\": \"Профиль\"\n },\n \"chat\": {\n \"title\": \"Чат\",\n \"conversations\": \"Разговоры\",\n \"conversation\": \"Разговор\",\n \"topics\": \"Темы\",\n \"archive\": \"Архив\",\n \"noTopics\": \"Тем пока нет\",\n \"newTopic\": \"Новая тема\",\n \"topicTitle\": \"Тема\",\n \"topicHint\": \"У темы своя история, а память и пространство — те же.\",\n \"loadOlder\": \"Более ранние сообщения\",\n \"emptyTitle\": \"Привет, я {name}\",\n \"placeholder\": \"Сообщение для {name}…\",\n \"send\": \"Отправить\",\n \"attach\": \"Прикрепить файлы\",\n \"typing\": \"Агент печатает\",\n \"moreSteps\": \"{count, plural, one {ещё # шаг} few {ещё # шага} many {ещё # шагов} other {ещё # шага}}\",\n \"hideSteps\": \"Скрыть шаги\",\n \"unread\": \"{count, plural, one {# непрочитанный ответ} few {# непрочитанных ответа} many {# непрочитанных ответов} other {# непрочитанных ответа}}\",\n \"retry\": \"Повторить\",\n \"tooLarge\": \"Файл слишком большой.\",\n \"stop\": \"Остановить\",\n \"voice\": {\n \"hold\": \"Удерживайте для записи\",\n \"stop\": \"Остановить запись\",\n \"recording\": \"Запись… {seconds} с\",\n \"review\": \"Проверьте расшифровку перед отправкой\",\n \"notRecognized\": \"Речь не распознана\",\n \"micDenied\": \"Нет доступа к микрофону\",\n \"unsupported\": \"Голосовой ввод не поддерживается этим браузером\",\n \"start\": \"Записать голосом\",\n \"done\": \"Стоп\",\n \"recognizing\": \"Распознаём…\",\n \"recordingNow\": \"Запись\",\n \"failed\": \"Не удалось распознать голосовое сообщение\",\n \"retry\": \"Повторить\"\n },\n \"confirm\": {\n \"title\": \"Подтвердите действие\",\n \"text\": \"Агент хочет выполнить: {action}\",\n \"approve\": \"Выполнить\",\n \"reject\": \"Отклонить\"\n },\n \"wait\": {\n \"starting\": \"Агент запускается…\",\n \"queued\": \"{count, plural, =0 {В очереди · вы следующий} other {В очереди · перед вами #}}\"\n },\n \"palette\": {\n \"title\": \"Команды и скиллы\",\n \"commands\": \"Команды\",\n \"skills\": \"Скиллы\",\n \"noSkills\": \"Вам не выдан ни один скилл\",\n \"empty\": \"Ничего не найдено\"\n },\n \"unknownCommand\": \"Неизвестная команда {name}\",\n \"sendAsText\": \"Отправить как текст\",\n \"skillPlaceholder\": \"Что сделать по скиллу?\",\n \"context\": {\n \"meter\": \"Контекст: {used} из {total} токенов ({pct} %)\",\n \"full\": \"Ответы дорожают, агент может путаться.\",\n \"compact\": \"Сжать\",\n \"reset\": \"Начать заново\"\n },\n \"event\": {\n \"details\": \"Изложение\"\n },\n \"files\": {\n \"open\": \"Открыть {name}\",\n \"download\": \"Скачать\",\n \"failed\": \"Не удалось открыть файл\",\n \"tooLarge\": \"Файл слишком большой для просмотра — скачайте его\",\n \"save\": \"Скачать {name}\",\n \"notUtf8\": \"Файл не в кодировке UTF-8 — скачайте его\",\n \"rows\": \"Показаны {shown} из {total, plural, one {# строки} other {# строк}}\",\n \"source\": \"Код\",\n \"page\": \"Страница\"\n }\n }\n}\n","{\n \"loading\": \"Wird geladen…\",\n \"cancel\": \"Abbrechen\",\n \"create\": \"Erstellen\",\n \"close\": \"Schließen\",\n \"delete\": \"Löschen\",\n \"remove\": \"Entfernen\",\n \"agentName\": \"Name des Agenten\",\n \"topbar\": {\n \"sections\": \"Bereiche\",\n \"profile\": \"Profil\"\n },\n \"chat\": {\n \"title\": \"Chat\",\n \"conversations\": \"Gespräche\",\n \"conversation\": \"Gespräch\",\n \"topics\": \"Themen\",\n \"archive\": \"Archiv\",\n \"noTopics\": \"Noch keine Themen\",\n \"newTopic\": \"Neues Thema\",\n \"topicTitle\": \"Thema\",\n \"topicHint\": \"Ein Thema hat einen eigenen Verlauf, aber dasselbe Gedächtnis und denselben Arbeitsbereich.\",\n \"loadOlder\": \"Frühere Nachrichten\",\n \"emptyTitle\": \"Hallo, ich bin {name}\",\n \"placeholder\": \"Nachricht an {name}…\",\n \"send\": \"Senden\",\n \"attach\": \"Dateien anhängen\",\n \"typing\": \"Der Agent schreibt\",\n \"moreSteps\": \"{count, plural, one {# weiterer Schritt} other {# weitere Schritte}}\",\n \"hideSteps\": \"Schritte ausblenden\",\n \"unread\": \"{count, plural, one {# ungelesene Antwort} other {# ungelesene Antworten}}\",\n \"retry\": \"Wiederholen\",\n \"tooLarge\": \"Die Datei ist zu groß.\",\n \"stop\": \"Stoppen\",\n \"voice\": {\n \"hold\": \"Zum Aufnehmen gedrückt halten\",\n \"stop\": \"Aufnahme beenden\",\n \"recording\": \"Aufnahme… {seconds} s\",\n \"review\": \"Prüfen Sie die Transkription vor dem Senden\",\n \"notRecognized\": \"Die Sprache wurde nicht erkannt\",\n \"micDenied\": \"Kein Zugriff auf das Mikrofon\",\n \"unsupported\": \"Spracheingabe wird von diesem Browser nicht unterstützt\",\n \"start\": \"Sprachnachricht aufnehmen\",\n \"done\": \"Stopp\",\n \"recognizing\": \"Wird erkannt…\",\n \"recordingNow\": \"Aufnahme\",\n \"failed\": \"Die Sprachnachricht konnte nicht erkannt werden\",\n \"retry\": \"Wiederholen\"\n },\n \"confirm\": {\n \"title\": \"Aktion bestätigen\",\n \"text\": \"Der Agent möchte ausführen: {action}\",\n \"approve\": \"Ausführen\",\n \"reject\": \"Ablehnen\"\n },\n \"wait\": {\n \"starting\": \"Der Agent startet…\",\n \"queued\": \"{count, plural, =0 {In der Warteschlange · Sie sind als Nächstes dran} other {In der Warteschlange · # vor Ihnen}}\"\n },\n \"palette\": {\n \"title\": \"Befehle und Skills\",\n \"commands\": \"Befehle\",\n \"skills\": \"Skills\",\n \"noSkills\": \"Ihnen ist kein Skill freigegeben\",\n \"empty\": \"Nichts gefunden\"\n },\n \"unknownCommand\": \"Unbekannter Befehl {name}\",\n \"sendAsText\": \"Als Text senden\",\n \"skillPlaceholder\": \"Was soll mit dem Skill getan werden?\",\n \"context\": {\n \"meter\": \"Kontext: {used} von {total} Tokens ({pct} %)\",\n \"full\": \"Antworten werden teurer, der Agent kann durcheinanderkommen.\",\n \"compact\": \"Komprimieren\",\n \"reset\": \"Neu beginnen\"\n },\n \"event\": {\n \"details\": \"Zusammenfassung\"\n },\n \"files\": {\n \"open\": \"{name} öffnen\",\n \"download\": \"Herunterladen\",\n \"failed\": \"Die Datei konnte nicht geöffnet werden\",\n \"tooLarge\": \"Die Datei ist zu groß für die Vorschau — bitte herunterladen\",\n \"save\": \"{name} herunterladen\",\n \"notUtf8\": \"Die Datei ist nicht in UTF-8 — bitte herunterladen\",\n \"rows\": \"{shown} von {total, plural, one {# Zeile} other {# Zeilen}} angezeigt\",\n \"source\": \"Code\",\n \"page\": \"Seite\"\n }\n }\n}\n","{\n \"loading\": \"Cargando…\",\n \"cancel\": \"Cancelar\",\n \"create\": \"Crear\",\n \"close\": \"Cerrar\",\n \"delete\": \"Eliminar\",\n \"remove\": \"Quitar\",\n \"agentName\": \"Nombre del agente\",\n \"topbar\": {\n \"sections\": \"Secciones\",\n \"profile\": \"Perfil\"\n },\n \"chat\": {\n \"title\": \"Chat\",\n \"conversations\": \"Conversaciones\",\n \"conversation\": \"Conversación\",\n \"topics\": \"Temas\",\n \"archive\": \"Archivo\",\n \"noTopics\": \"Aún no hay temas\",\n \"newTopic\": \"Nuevo tema\",\n \"topicTitle\": \"Tema\",\n \"topicHint\": \"Un tema tiene su propio historial y la misma memoria y espacio.\",\n \"loadOlder\": \"Mensajes anteriores\",\n \"emptyTitle\": \"Hola, soy {name}\",\n \"placeholder\": \"Mensaje para {name}…\",\n \"send\": \"Enviar\",\n \"attach\": \"Adjuntar archivos\",\n \"typing\": \"El agente está escribiendo\",\n \"moreSteps\": \"{count, plural, one {# paso más} other {# pasos más}}\",\n \"hideSteps\": \"Ocultar pasos\",\n \"unread\": \"{count, plural, one {# respuesta sin leer} other {# respuestas sin leer}}\",\n \"retry\": \"Reintentar\",\n \"tooLarge\": \"El archivo es demasiado grande.\",\n \"stop\": \"Detener\",\n \"voice\": {\n \"hold\": \"Mantenga pulsado para grabar\",\n \"stop\": \"Detener la grabación\",\n \"recording\": \"Grabando… {seconds} s\",\n \"review\": \"Revise la transcripción antes de enviar\",\n \"notRecognized\": \"No se reconoció la voz\",\n \"micDenied\": \"Sin acceso al micrófono\",\n \"unsupported\": \"Este navegador no admite la entrada de voz\",\n \"start\": \"Grabar un mensaje de voz\",\n \"done\": \"Detener\",\n \"recognizing\": \"Reconociendo…\",\n \"recordingNow\": \"Grabando\",\n \"failed\": \"No se pudo reconocer el mensaje de voz\",\n \"retry\": \"Reintentar\"\n },\n \"confirm\": {\n \"title\": \"Confirme la acción\",\n \"text\": \"El agente quiere ejecutar: {action}\",\n \"approve\": \"Ejecutar\",\n \"reject\": \"Rechazar\"\n },\n \"wait\": {\n \"starting\": \"El agente se está iniciando…\",\n \"queued\": \"{count, plural, =0 {En cola · usted es el siguiente} other {En cola · # por delante}}\"\n },\n \"palette\": {\n \"title\": \"Comandos y skills\",\n \"commands\": \"Comandos\",\n \"skills\": \"Skills\",\n \"noSkills\": \"No tiene skills disponibles\",\n \"empty\": \"No se encontró nada\"\n },\n \"unknownCommand\": \"Comando desconocido {name}\",\n \"sendAsText\": \"Enviar como texto\",\n \"skillPlaceholder\": \"¿Qué hacer con el skill?\",\n \"context\": {\n \"meter\": \"Contexto: {used} de {total} tokens ({pct} %)\",\n \"full\": \"Las respuestas se encarecen y el agente puede confundirse.\",\n \"compact\": \"Compactar\",\n \"reset\": \"Empezar de nuevo\"\n },\n \"event\": {\n \"details\": \"Resumen\"\n },\n \"files\": {\n \"open\": \"Abrir {name}\",\n \"download\": \"Descargar\",\n \"failed\": \"No se pudo abrir el archivo\",\n \"tooLarge\": \"El archivo es demasiado grande para la vista previa: descárguelo\",\n \"save\": \"Descargar {name}\",\n \"notUtf8\": \"El archivo no está en UTF-8: descárguelo\",\n \"rows\": \"Se muestran {shown} de {total, plural, one {# fila} other {# filas}}\",\n \"source\": \"Código\",\n \"page\": \"Página\"\n }\n }\n}\n","{\n \"loading\": \"加载中…\",\n \"cancel\": \"取消\",\n \"create\": \"创建\",\n \"close\": \"关闭\",\n \"delete\": \"删除\",\n \"remove\": \"移除\",\n \"agentName\": \"智能体名称\",\n \"topbar\": {\n \"sections\": \"栏目\",\n \"profile\": \"个人资料\"\n },\n \"chat\": {\n \"title\": \"聊天\",\n \"conversations\": \"对话\",\n \"conversation\": \"对话\",\n \"topics\": \"话题\",\n \"archive\": \"归档\",\n \"noTopics\": \"暂无话题\",\n \"newTopic\": \"新话题\",\n \"topicTitle\": \"话题\",\n \"topicHint\": \"话题有独立的历史记录,记忆和空间与主对话相同。\",\n \"loadOlder\": \"更早的消息\",\n \"emptyTitle\": \"你好,我是 {name}\",\n \"placeholder\": \"给 {name} 发消息…\",\n \"send\": \"发送\",\n \"attach\": \"附加文件\",\n \"typing\": \"智能体正在输入\",\n \"moreSteps\": \"{count, plural, other {另外 # 个步骤}}\",\n \"hideSteps\": \"隐藏步骤\",\n \"unread\": \"{count} 条未读回复\",\n \"retry\": \"重试\",\n \"tooLarge\": \"文件太大。\",\n \"stop\": \"停止\",\n \"voice\": {\n \"hold\": \"按住录音\",\n \"stop\": \"停止录音\",\n \"recording\": \"录音中… {seconds} 秒\",\n \"review\": \"发送前请检查转写文本\",\n \"notRecognized\": \"未能识别语音\",\n \"micDenied\": \"无法访问麦克风\",\n \"unsupported\": \"此浏览器不支持语音输入\",\n \"start\": \"录制语音\",\n \"done\": \"停止\",\n \"recognizing\": \"正在识别…\",\n \"recordingNow\": \"录音中\",\n \"failed\": \"无法识别语音消息\",\n \"retry\": \"重试\"\n },\n \"confirm\": {\n \"title\": \"确认操作\",\n \"text\": \"代理想要执行:{action}\",\n \"approve\": \"执行\",\n \"reject\": \"拒绝\"\n },\n \"wait\": {\n \"starting\": \"代理正在启动…\",\n \"queued\": \"{count, plural, =0 {排队中 · 您是下一位} other {排队中 · 前面还有 # 位}}\"\n },\n \"palette\": {\n \"title\": \"命令和技能\",\n \"commands\": \"命令\",\n \"skills\": \"技能\",\n \"noSkills\": \"您没有可用的技能\",\n \"empty\": \"未找到\"\n },\n \"unknownCommand\": \"未知命令 {name}\",\n \"sendAsText\": \"作为文本发送\",\n \"skillPlaceholder\": \"用这个技能做什么?\",\n \"context\": {\n \"meter\": \"上下文:{used} / {total} 个令牌({pct}%)\",\n \"full\": \"回答变得更贵,代理可能会混淆。\",\n \"compact\": \"压缩\",\n \"reset\": \"重新开始\"\n },\n \"event\": {\n \"details\": \"摘要\"\n },\n \"files\": {\n \"open\": \"打开 {name}\",\n \"download\": \"下载\",\n \"failed\": \"无法打开文件\",\n \"tooLarge\": \"文件太大,无法预览,请下载\",\n \"save\": \"下载 {name}\",\n \"notUtf8\": \"文件不是 UTF-8 编码,请下载\",\n \"rows\": \"显示 {total} 行中的 {shown} 行\",\n \"source\": \"代码\",\n \"page\": \"页面\"\n }\n }\n}\n","import en from \"./en.json\";\nimport ru from \"./ru.json\";\nimport de from \"./de.json\";\nimport es from \"./es.json\";\nimport zh from \"./zh.json\";\n\n/** Strings of the components in the five languages of the products. A product adds\n * them to its i18next instance under the namespace `uikit`. */\nexport const resources = { en, ru, de, es, zh };\nexport type KitLanguage = keyof typeof resources;\nexport { UIKIT_NS } from \"../i18n\";\n"],"mappings":";;;AKQA,IAAaiC,IAAY;CAAE,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CAAI,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;AAAG"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.5.0",
3
3
  "classes": [
4
4
  "a",
5
5
  "action",
@@ -17,6 +17,8 @@
17
17
  "app",
18
18
  "arch",
19
19
  "att-cap",
20
+ "att-html",
21
+ "att-htmlbox",
20
22
  "att-ic",
21
23
  "att-img",
22
24
  "att-kl",
@@ -93,10 +95,12 @@
93
95
  "hide-m",
94
96
  "hint",
95
97
  "hintbox",
98
+ "html",
96
99
  "i",
97
100
  "ic",
98
101
  "iconbtn",
99
102
  "image",
103
+ "in-burger",
100
104
  "inherit",
101
105
  "inp",
102
106
  "it",
@@ -216,6 +220,8 @@
216
220
  "agentoptions",
217
221
  "app",
218
222
  "att-cap",
223
+ "att-html",
224
+ "att-htmlbox",
219
225
  "att-ic",
220
226
  "att-img",
221
227
  "att-kl",
package/dist/styles.css CHANGED
@@ -495,6 +495,9 @@ h3.sec {
495
495
  inset: 0;
496
496
  background: var(--overlay);
497
497
  display: grid;
498
+ /* the column is never wider than the screen: wide content (code, a table)
499
+ scrolls inside the modal instead of pushing it past the edges */
500
+ grid-template-columns: minmax(0, 1fr);
498
501
  place-items: center;
499
502
  padding: 24px;
500
503
  z-index: 50;
@@ -693,11 +696,20 @@ textarea.inp {
693
696
  border-radius: var(--r-m);
694
697
  padding: 8px 10px;
695
698
  font-size: 14px;
699
+ line-height: 20px;
696
700
  min-height: 38px;
697
- max-height: 160px;
701
+ /* three lines: the field grows up to them, then scrolls (FTR.NAB.CHAT-0001 design §3.1) */
702
+ max-height: calc(3 * 20px + 18px);
703
+ overflow-y: auto;
698
704
  resize: none;
699
705
  background: var(--surface);
700
706
  }
707
+ /* the focus is the border of the field itself: a ring around a growing field read as a second frame */
708
+ .composer textarea:focus-visible {
709
+ outline: none;
710
+ border-color: var(--violet);
711
+ box-shadow: 0 0 0 1px var(--violet);
712
+ }
701
713
  .composer .rec-box {
702
714
  flex: 1;
703
715
  color: var(--red);
@@ -944,6 +956,9 @@ table.t tr.clickable {
944
956
  .side .lab {
945
957
  display: none;
946
958
  }
959
+ .side.in-burger {
960
+ display: none;
961
+ }
947
962
  }
948
963
  @media (prefers-reduced-motion: reduce) {
949
964
  * {
@@ -1031,10 +1046,34 @@ table.t tr.clickable {
1031
1046
  font-size: 15px;
1032
1047
  color: var(--text);
1033
1048
  }
1034
- .navmenu a.on {
1049
+ .navmenu a.on,
1050
+
1051
+ /* the navigation of a part of the product behind the burger: a column, with its title */
1052
+ .navmenu .side {
1053
+ display: flex;
1054
+ flex-direction: column;
1055
+ gap: 2px;
1056
+ min-width: 240px;
1057
+ max-height: calc(100vh - 96px);
1058
+ overflow-y: auto;
1059
+ padding: 0;
1060
+ border: 0;
1061
+ background: none;
1062
+ }
1063
+ .navmenu .side .lab {
1064
+ display: block;
1065
+ padding: 6px 12px 4px;
1066
+ }
1067
+ .navmenu .side a {
1068
+ padding: 10px 12px;
1069
+ font-size: 15px;
1070
+ color: var(--text);
1071
+ }
1072
+ .navmenu .side a.active {
1035
1073
  background: var(--violet-soft);
1036
1074
  color: var(--violet-text);
1037
1075
  font-weight: 600;
1076
+ box-shadow: none;
1038
1077
  }
1039
1078
  .kpi {
1040
1079
  display: grid;
@@ -1382,16 +1421,21 @@ select.inp.inherit {
1382
1421
  .att-tile.pdf .att-ic{background:var(--red-soft);color:var(--red)}.att-tile.pdf .att-kl{background:var(--red)}
1383
1422
  .att-tile.markdown .att-ic,.att-tile.image .att-ic{background:var(--violet-soft);color:var(--violet)}.att-tile.markdown .att-kl,.att-tile.image .att-kl{background:var(--violet)}
1384
1423
  .att-tile.table .att-ic{background:var(--green-soft);color:var(--green)}.att-tile.table .att-kl{background:var(--green)}
1424
+ .att-tile.html .att-ic{background:var(--amber-soft);color:var(--amber)}.att-tile.html .att-kl{background:var(--amber)}
1385
1425
  .att-tile.dl .att-ic{color:var(--muted)}.att-tile.dl .att-kl{background:var(--muted)}
1386
1426
  .att-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1387
1427
  .att-title{display:flex;align-items:baseline;gap:10px;min-width:0}
1388
- .att-view{display:grid;place-items:center;min-height:200px}
1428
+ .att-view{display:grid;place-items:center;min-height:200px;min-width:0}
1389
1429
  .att-img{max-width:100%;max-height:70vh;object-fit:contain;border-radius:var(--r-m)}
1390
1430
  .att-pdf{width:100%;height:70vh;border:1px solid var(--border);border-radius:var(--r-m);background:var(--surface)}
1391
1431
  .att-view.markdown{display:block}
1392
1432
  .att-md{max-height:70vh;overflow:auto;padding:4px 2px}
1393
1433
  .att-msg{color:var(--muted);display:flex;align-items:center;gap:8px}
1394
- .att-view.table,.att-view.text{display:block}
1434
+ .att-view.table,.att-view.text,.att-view.html{display:block}
1435
+ .att-htmlbox{width:100%;height:70vh;overflow:hidden;border:1px solid var(--border);border-radius:var(--r-m);background:#fff}
1436
+ .att-html{display:block;border:0;transform-origin:0 0;background:#fff}
1437
+ /* a page or a PDF is seen better wider than the modal of the kit */
1438
+ .modal.wide:has(.att-view.html),.modal.wide:has(.att-view.pdf){width:1100px}
1395
1439
  .att-table{max-height:70vh;overflow:auto}
1396
1440
  .att-table table{border-collapse:collapse;font-family:var(--mono);font-size:12px}
1397
1441
  .att-table th,.att-table td{border:1px solid var(--border);padding:5px 8px;text-align:left;white-space:nowrap}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@green-on-grey/ui-kit",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "UI kit of the Nabu and Hammurapi products: styles, components, the chat and the sign-in screen",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {