layout.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. export const settingsLayout = {
  2. layout: {
  3. body: ' bg-background ',
  4. defaults: {
  5. name: 'hor',
  6. theme: 'auto',
  7. lang: 'en',
  8. feed_unit: 'default',
  9. },
  10. avaliable_layouts: ['hor', 'ver', 'mixed'],
  11. avaliable_feed_units: ['Full feed', 'Compact feed'],
  12. avaliable_langs: ['auto', 'en', 'ru', 'es', 'de', 'fr'],
  13. screen: ' w-full ',
  14. max_width: ' ns--undefined-- w-full flex-auto web:h-full ne-- ',
  15. page_content_width_default: ' ns--page-content-width-- w-full max-w-8xl ne-- ',
  16. page_content_width:{
  17. layout_1_column_thin: 'w-full max-w-md',
  18. layout_1_column_half: 'w-full max-w-4xl',
  19. chat: 'w-full',
  20. // Page URI or layout name. Forks override in customization/settings.js.
  21. 'tasks-home': 'w-full',
  22. task: 'w-full',
  23. 'view-task': 'w-full',
  24. },
  25. page_content_padding: ' p-4 ',
  26. page_content_padding_default: ' p-4 ',
  27. // Per-layout padding tiers for `responsiveClasses` (same values as UNA page `config.padding`).
  28. // Missing key → `page_content_padding_default`. `[]` = off. `true` = all breakpoints.
  29. // UNA `config.padding` still wins when the page sends it.
  30. page_content_padding_layouts: {
  31. chat: [],
  32. },
  33. page_content_gap: ' gap-4 ',
  34. page_content_gap_default: ' sm:gap-4 ',
  35. max_width_landing: 'w-full max-w-8xl ',
  36. max_width_block: ' max-w-8xl ',
  37. padding_content: ' @list-sm/list:m-1 @list-md/list:m-2',
  38. feed_container: ' w-full flex-1 max-w-3xl sm:p-4 mx-auto ',
  39. post_container: ' max-w-3xl w-full flex-1 bg-card text-card-foreground rounded-2xl p-3 sm:py-4 lg:my-4 mx-auto ', // for hor = max-w-screen-xl, for ver = max-w-screen-lg
  40. search: true,
  41. sidebar_search: true,
  42. extended_search: true,
  43. apps: true,
  44. add_menu: true,
  45. show_profile_info: true,
  46. tooltips: true,
  47. hide_header_for_non_logged: false,
  48. hide_header_for_all: false,
  49. card_animation_duration: 100,
  50. user_remote_config: true,
  51. background_image_color: '',
  52. background_image: '',
  53. background_image_dark: '',
  54. /** Interface sounds (Cuelume cues, `app/lib/sound`). Users can turn them off in their settings; false turns them off for everyone. */
  55. sounds: true,
  56. tab_sounds: false,
  57. show_login_modal: 0,
  58. //redirect_on_forbidden: '/home',
  59. lock_unconfirmed: true,
  60. lock_no_profile: true,
  61. allow_create_new_profile: true,
  62. button_style_for_actions: 'secondary',
  63. share_text: '',
  64. default_icon_stroke_width: 2,
  65. tablet_mode_from: 'lg',
  66. show_tabbar_on_mobile_non_logged: false,
  67. header: {
  68. container: ' ns--header-wrapper-- w-full z-50 header-fixed web:fixed native:absolute native:top-0 native:left-0 native:right-0 web:top-0 web:transition-[transform,background-color,border-color] web:duration-300 web:ease-in-out ne--',
  69. /**
  70. * Color wash behind glass chrome. Applied as an overlay that
  71. * extends `fade_extend` below the measured header.
  72. */
  73. fade: 'bg-linear-to-b from-background to-background/0',
  74. /** Extra px the color wash extends below the header. */
  75. fade_extend: 0,
  76. /**
  77. * Native wash where `fade_blur` is off (Android): solid through the
  78. * header, easing out over `extend` px below it — like the iOS blur —
  79. * so content scrolling underneath (chat) doesn't show through the
  80. * title row. `extend` is visual only (lists keep `fade_extend`).
  81. * null falls back to `fade` / `fade_extend`.
  82. */
  83. fade_native: { className: 'bg-linear-to-b from-background from-75% to-background/0', extend: 16 },
  84. /**
  85. * iOS: progressive blur instead of the `fade` wash, like native
  86. * bars — a SwiftUI material masked by an eased gradient (fully
  87. * blurred for `hold` of the height, then eases out). `extend` = px
  88. * past the header. `tint` = opacity of `bg-background` over the
  89. * material per scheme (dark `thin` alone reads as `bg-card`).
  90. * null keeps the `fade` wash.
  91. */
  92. // Transparency knobs: `opacity` (peak strength, blur + tint) is the
  93. // gentlest; `material` (ultraThin → thick), `hold`, `tint` also help.
  94. fade_blur: { material: 'thin', hold: 0.5, opacity: 0.8, extend: 16, tint: { dark: 0.75 } },
  95. /** Optional. When set (non-blank), appended to `container` while scrollY > 0 (full-width bar: shadow, border, etc.). */
  96. container_scrolled: ' ns--header-wrapper-scrolled-- shadow-none lg:bg-card/60 lg:backdrop-blur-lg lg:shadow-border-b dark:lg:shadow-border-b-deep ne-- ',
  97. content: ' ns--header-content-- items-center justify-between h-16 lg:bg-card/60 lg:backdrop-blur-lg lg:shadow-border-b dark:lg:shadow-border-b-deep mx-auto w-full ne-- ',
  98. /** Optional. When set (non-blank), applied to header content only while scrollY > 0. If unset, legacy `content_pinned_fixed` behavior is unchanged. */
  99. content_scrolled: ' ns--header-content-scrolled-- ',
  100. content_pinned_fixed: ' ',
  101. content_left: 'flex-none 2xl:w-full 2xl:max-w-1/4 px-4 gap-3',
  102. content_center: ' hidden flex-1 lg:flex gap-2 items-center justify-center max-w-3xl px-4 ',
  103. content_right: ' items-end flex-none 2xl:w-full 2xl:max-w-1/4 px-4 gap-3',
  104. active_item_indicator: 'absolute -bottom-2 left-0 h-0.5 rounded-full flex-none bg-ring',
  105. active_item_indicator_bg: 'absolute bottom-0 left-0 h-12 w-full overflow-hidden rounded-lg flex-none',
  106. },
  107. /**
  108. * iOS: native progressive blur behind bottom composers (post comments,
  109. * messenger / agent) and in-panel overlay headers, instead of their
  110. * `bg-linear-to-* … to-transparent` wash — same shape as
  111. * `header.fade_blur` (`hold` is measured from the anchored edge;
  112. * `extend` is unused, the containers carry their own fade run-up).
  113. * null keeps the wash.
  114. */
  115. footer_fade_blur: { material: 'thin', hold: 0.45, opacity: 0.8, tint: { dark: 0.75 } },
  116. /**
  117. * iOS NativeTabs: native blur behind the floating tab bar on tab
  118. * screens, matching `header.fade_blur`. Height = the tab screen's bottom
  119. * safe-area inset (home indicator + tab bar, 83pt on iPhone 15 Pro) +
  120. * `extend`. null leaves only the system edge effect.
  121. */
  122. tabbar_fade_blur: { material: 'thin', hold: 0.5, opacity: 0.8, extend: 44, tint: { dark: 0.75 } },
  123. vertical: {
  124. blocks: [
  125. /* {
  126. name: 'system/profile_menu/TemplServiceProfiles',
  127. showTitle: false,
  128. showBg: false,
  129. },*/
  130. ],
  131. },
  132. external_scripts: [],
  133. },
  134. layouts: {
  135. '/': {
  136. // For the splash screen (home page when not logged in)
  137. max_width: '',
  138. },
  139. '/login': {
  140. max_width: '',
  141. },
  142. '/create-account': {
  143. max_width: '',
  144. },
  145. copilot: {
  146. layout: 'chat',
  147. },
  148. home: {
  149. adjustable: false,
  150. sizable: false,
  151. cells: {
  152. left: {
  153. defaultSize: 0,
  154. minSize: 0,
  155. maxSize: 25,
  156. breakpoint: 'xl',
  157. responsive: {
  158. xl: {
  159. defaultSize: 25,
  160. minSize: 25,
  161. maxSize: 25,
  162. },
  163. '2xl': {
  164. defaultSize: 25,
  165. minSize: 25,
  166. maxSize: 25,
  167. },
  168. },
  169. },
  170. center: {
  171. defaultSize: 100,
  172. minSize: 50,
  173. maxSize: 100,
  174. responsive: {
  175. lg: {
  176. defaultSize: 65,
  177. minSize: 65,
  178. maxSize: 65,
  179. },
  180. xl: {
  181. defaultSize: 50,
  182. minSize: 50,
  183. maxSize: 50,
  184. },
  185. '2xl': {
  186. defaultSize: 50,
  187. minSize: 50,
  188. maxSize: 50,
  189. },
  190. },
  191. },
  192. right: {
  193. defaultSize: 0,
  194. minSize: 0,
  195. maxSize: 35,
  196. breakpoint: 'lg',
  197. responsive: {
  198. lg: {
  199. defaultSize: 35,
  200. minSize: 35,
  201. maxSize: 35,
  202. },
  203. xl: {
  204. defaultSize: 25,
  205. minSize: 25,
  206. maxSize: 25,
  207. },
  208. '2xl': {
  209. defaultSize: 25,
  210. minSize: 25,
  211. maxSize: 25,
  212. },
  213. },
  214. },
  215. },
  216. },
  217. wiki: {
  218. adjustable: false,
  219. sizable: true,
  220. 'panel-line': 'bg-border/0 web:hover:bg-accent-foreground/60 w-1 duration-300',
  221. cells: {
  222. left: {
  223. defaultSize: 0,
  224. minSize: 0,
  225. maxSize: 25,
  226. // Nav is primary — show from lg; TOC waits for xl.
  227. breakpoint: 'lg',
  228. responsive: {
  229. lg: {
  230. defaultSize: 25,
  231. minSize: 25,
  232. maxSize: 25,
  233. },
  234. xl: {
  235. defaultSize: 25,
  236. minSize: 25,
  237. maxSize: 25,
  238. },
  239. '2xl': {
  240. defaultSize: 20,
  241. minSize: 15,
  242. maxSize: 25,
  243. },
  244. },
  245. },
  246. center: {
  247. defaultSize: 100,
  248. minSize: 50,
  249. maxSize: 100,
  250. responsive: {
  251. lg: {
  252. defaultSize: 75,
  253. minSize: 75,
  254. maxSize: 75,
  255. },
  256. xl: {
  257. defaultSize: 50,
  258. minSize: 50,
  259. maxSize: 50,
  260. },
  261. '2xl': {
  262. defaultSize: 60,
  263. minSize: 40,
  264. maxSize: 70,
  265. },
  266. },
  267. },
  268. right: {
  269. defaultSize: 0,
  270. minSize: 0,
  271. maxSize: 35,
  272. breakpoint: 'xl',
  273. responsive: {
  274. xl: {
  275. defaultSize: 25,
  276. minSize: 25,
  277. maxSize: 25,
  278. },
  279. '2xl': {
  280. defaultSize: 20,
  281. minSize: 15,
  282. maxSize: 30,
  283. },
  284. },
  285. },
  286. },
  287. },
  288. chat: {
  289. adjustable: true,
  290. sizable: true,
  291. cells: {
  292. left: {
  293. defaultSize: 30,
  294. minSize: 20,
  295. maxSize: 40,
  296. breakpoint: 'lg',
  297. },
  298. center: { defaultSize: 70, minSize: 40, maxSize: 80 },
  299. },
  300. },
  301. 'cols-c': {
  302. adjustable: true,
  303. sizable: true,
  304. cells: {
  305. center: { defaultSize: 100, minSize: 50, maxSize: 100 },
  306. },
  307. },
  308. 'cols-l-c-r': {
  309. adjustable: true,
  310. sizable: true,
  311. cells: {
  312. left: {
  313. defaultSize: 25,
  314. minSize: 20,
  315. maxSize: 30,
  316. breakpoint: 'xl',
  317. },
  318. center: { defaultSize: 50, minSize: 40, maxSize: 60 },
  319. right: {
  320. defaultSize: 25,
  321. minSize: 20,
  322. maxSize: 30,
  323. breakpoint: 'xl',
  324. },
  325. },
  326. },
  327. 'cols-l-c': {
  328. adjustable: true,
  329. sizable: true,
  330. cells: {
  331. left: {
  332. defaultSize: 30,
  333. minSize: 15,
  334. maxSize: 30,
  335. breakpoint: 'xl',
  336. responsive: {
  337. '2xl':{
  338. defaultSize: 20,
  339. minSize: 15,
  340. maxSize: 30,
  341. }
  342. }
  343. },
  344. center: {
  345. defaultSize: 70, minSize: 70, maxSize: 80,
  346. responsive: {
  347. '2xl':{
  348. defaultSize: 80,
  349. minSize: 70,
  350. maxSize: 85,
  351. }
  352. }
  353. },
  354. },
  355. },
  356. 'cols-c-r': {
  357. adjustable: true,
  358. sizable: true,
  359. cells: {
  360. center: {
  361. defaultSize: 60,
  362. minSize: 50,
  363. maxSize: 70,
  364. responsive: {
  365. '2xl':{
  366. defaultSize: 70,
  367. minSize: 65,
  368. maxSize: 75,
  369. breakpoint: 'xl',
  370. }
  371. }
  372. },
  373. right: {
  374. defaultSize: 40,
  375. minSize: 30,
  376. maxSize: 50,
  377. breakpoint: 'lg',
  378. responsive: {
  379. '2xl':{
  380. defaultSize: 30,
  381. minSize: 25,
  382. maxSize: 35,
  383. breakpoint: 'xl',
  384. }
  385. }
  386. },
  387. },
  388. },
  389. }
  390. }