@loftyshaky/shared 0.0.40 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/_locales/de/messages.json +0 -0
  2. package/_locales/en/messages.json +3 -0
  3. package/_locales/ru/messages.json +3 -0
  4. package/announcement.d.ts +2 -0
  5. package/announcement.js +1 -0
  6. package/app.d.ts +0 -0
  7. package/app.js +1 -1
  8. package/chunk-main-30216ab6.js +9 -0
  9. package/chunk-main-3fee580d.js +1 -0
  10. package/chunk-main-70539558.js +1 -0
  11. package/chunk-pickr.min-f7ab594a.js +1 -0
  12. package/ext.d.ts +0 -0
  13. package/ext.js +1 -1
  14. package/fonts/noto_sans.woff2 +0 -0
  15. package/html/announcement.html +15 -0
  16. package/index.d.ts +1 -1
  17. package/index.js +1 -1
  18. package/inputs.d.ts +0 -0
  19. package/inputs.js +1 -1
  20. package/js/apps.js +60 -0
  21. package/js/{ext/env.js → env.js} +2 -2
  22. package/js/ext/manifest.js +2 -2
  23. package/js/{ext/locales.js → locales.js} +13 -4
  24. package/js/package/plugins/rollup-plugin-copy.js +0 -0
  25. package/js/package/plugins/watcher.js +5 -3
  26. package/js/package/terser.js +0 -0
  27. package/js/project_name.js +0 -0
  28. package/js/projects_path.js +1 -1
  29. package/js/task_scheduler.js +1 -1
  30. package/js/webpack.config.js +159 -0
  31. package/package.json +1 -1
  32. package/scss/announcement/body.scss +10 -0
  33. package/scss/announcement/index.scss +3 -0
  34. package/scss/announcement/main.scss +8 -0
  35. package/scss/settings/ext_version.scss +0 -0
  36. package/scss/settings/index.scss +0 -0
  37. package/scss/settings/main.scss +0 -0
  38. package/scss/settings/section_btns.scss +0 -0
  39. package/scss/settings/sections.scss +0 -0
  40. package/scss/settings/transitions.scss +21 -20
  41. package/scss/shared/all.scss +0 -0
  42. package/scss/shared/btns.scss +39 -30
  43. package/scss/shared/checkboxes.scss +0 -0
  44. package/scss/shared/color_pickers.scss +0 -0
  45. package/scss/shared/colors.scss +0 -0
  46. package/scss/shared/crash_handler.scss +0 -0
  47. package/scss/shared/css_vars.scss +0 -0
  48. package/scss/shared/embed/error.scss +0 -0
  49. package/scss/shared/embed/font_face.scss +1 -1
  50. package/scss/shared/embed/loading_screen.scss +1 -0
  51. package/scss/shared/embed/no_tr.scss +0 -0
  52. package/scss/shared/focus.scss +80 -78
  53. package/scss/shared/group.scss +18 -0
  54. package/scss/shared/help.scss +0 -0
  55. package/scss/shared/hr.scss +0 -0
  56. package/scss/shared/index.scss +1 -0
  57. package/scss/shared/input_btns.scss +0 -0
  58. package/scss/shared/inputs.scss +0 -0
  59. package/scss/shared/inset_border.scss +0 -0
  60. package/scss/shared/link_btns.scss +12 -12
  61. package/scss/shared/links.scss +0 -0
  62. package/scss/shared/mixins.scss +0 -0
  63. package/scss/shared/mods.scss +5 -1
  64. package/scss/shared/range.scss +0 -0
  65. package/scss/shared/scrollbar.scss +0 -0
  66. package/scss/shared/selects.scss +0 -0
  67. package/scss/shared/text.scss +0 -0
  68. package/scss/shared/textareas.scss +0 -0
  69. package/scss/shared/themes/colors/dark.scss +1 -0
  70. package/scss/shared/themes/colors/light.scss +1 -0
  71. package/scss/shared/themes/colors/very_dark.scss +1 -0
  72. package/scss/shared/themes/general/dark_theme.scss +0 -0
  73. package/scss/shared/themes/general/light_theme.scss +0 -0
  74. package/scss/shared/themes/general/template.scss +259 -244
  75. package/scss/shared/themes/general/template_focus.scss +52 -51
  76. package/scss/shared/themes/general/very_dark_theme.scss +0 -0
  77. package/scss/shared/transitions.scss +36 -31
  78. package/scss/shared/upload_box.scss +0 -0
  79. package/scss/shared/vars.scss +1 -0
  80. package/settings.d.ts +0 -0
  81. package/settings.js +1 -1
  82. package/ts/announcement/components/body.d.ts +3 -0
  83. package/ts/announcement/components/index.d.ts +1 -0
  84. package/ts/announcement/components/prop_types/body.d.ts +4 -0
  85. package/ts/announcement/components/prop_types/index.d.ts +1 -0
  86. package/ts/announcement/internal.d.ts +3 -0
  87. package/ts/announcement/scripts/display.d.ts +6 -0
  88. package/ts/announcement/scripts/header.d.ts +6 -0
  89. package/ts/announcement/scripts/index.d.ts +2 -0
  90. package/ts/error_modules/crash_handler/components/body.d.ts +4 -8
  91. package/ts/error_modules/crash_handler/components/index.d.ts +0 -0
  92. package/ts/error_modules/crash_handler/components/prop_types/body.d.ts +0 -0
  93. package/ts/error_modules/crash_handler/components/prop_types/index.d.ts +0 -0
  94. package/ts/error_modules/crash_handler/data/fatal_error.d.ts +0 -0
  95. package/ts/error_modules/crash_handler/data/index.d.ts +0 -0
  96. package/ts/error_modules/crash_handler/data/visibility.d.ts +0 -0
  97. package/ts/error_modules/crash_handler/scripts/index.d.ts +0 -0
  98. package/ts/error_modules/crash_handler/scripts/page.d.ts +0 -0
  99. package/ts/error_modules/css/scripts/index.d.ts +0 -0
  100. package/ts/error_modules/css/scripts/main.d.ts +0 -0
  101. package/ts/error_modules/error/components/body.d.ts +0 -0
  102. package/ts/error_modules/error/components/close_btn.d.ts +0 -0
  103. package/ts/error_modules/error/components/ext_name.d.ts +0 -0
  104. package/ts/error_modules/error/components/index.d.ts +0 -0
  105. package/ts/error_modules/error/components/msg.d.ts +0 -0
  106. package/ts/error_modules/error/components/prop_types/body.d.ts +2 -0
  107. package/ts/error_modules/error/components/prop_types/index.d.ts +0 -0
  108. package/ts/error_modules/error/data/index.d.ts +0 -0
  109. package/ts/error_modules/error/data/main.d.ts +0 -0
  110. package/ts/error_modules/error/data/msg.d.ts +0 -0
  111. package/ts/error_modules/error/data/state.d.ts +0 -0
  112. package/ts/error_modules/error/interfaces/error.d.ts +0 -0
  113. package/ts/error_modules/error/interfaces/error_obj.d.ts +0 -0
  114. package/ts/error_modules/error/interfaces/index.d.ts +0 -0
  115. package/ts/error_modules/error/interfaces/observable_keys.d.ts +0 -0
  116. package/ts/error_modules/error/interfaces/show_error.d.ts +0 -0
  117. package/ts/error_modules/error/interfaces/timeout_observable_keys.d.ts +0 -0
  118. package/ts/error_modules/error/scripts/globals.d.ts +0 -0
  119. package/ts/error_modules/error/scripts/index.d.ts +0 -0
  120. package/ts/error_modules/internal.d.ts +0 -0
  121. package/ts/inputs/color/components/body.d.ts +0 -0
  122. package/ts/inputs/color/components/color_picker.d.ts +0 -0
  123. package/ts/inputs/color/components/fill_shadow.d.ts +0 -0
  124. package/ts/inputs/color/components/index.d.ts +0 -0
  125. package/ts/inputs/color/components/prop_types/body.d.ts +0 -0
  126. package/ts/inputs/color/components/prop_types/color_picker.d.ts +0 -0
  127. package/ts/inputs/color/components/prop_types/fill_shadow.d.ts +0 -0
  128. package/ts/inputs/color/components/prop_types/index.d.ts +0 -0
  129. package/ts/inputs/color/components/prop_types/visualization.d.ts +0 -0
  130. package/ts/inputs/color/components/visualization.d.ts +0 -0
  131. package/ts/inputs/color/data/color.d.ts +0 -0
  132. package/ts/inputs/color/data/index.d.ts +0 -0
  133. package/ts/inputs/color/data/visibility.d.ts +0 -0
  134. package/ts/inputs/color/interfaces/color.d.ts +0 -0
  135. package/ts/inputs/color/interfaces/color_picker_state.d.ts +0 -0
  136. package/ts/inputs/color/interfaces/color_picker_state_one.d.ts +0 -0
  137. package/ts/inputs/color/interfaces/i.d.ts +0 -0
  138. package/ts/inputs/color/interfaces/index.d.ts +0 -0
  139. package/ts/inputs/color/obj/color.d.ts +0 -0
  140. package/ts/inputs/color/obj/index.d.ts +0 -0
  141. package/ts/inputs/color/scripts/color_picker.d.ts +0 -0
  142. package/ts/inputs/color/scripts/index.d.ts +0 -0
  143. package/ts/inputs/color/scripts/position.d.ts +0 -0
  144. package/ts/inputs/components/btn.d.ts +0 -0
  145. package/ts/inputs/components/checkbox.d.ts +0 -0
  146. package/ts/inputs/components/file.d.ts +0 -0
  147. package/ts/inputs/components/group.d.ts +3 -0
  148. package/ts/inputs/components/help.d.ts +0 -0
  149. package/ts/inputs/components/help_btn.d.ts +0 -0
  150. package/ts/inputs/components/hr.d.ts +0 -0
  151. package/ts/inputs/components/icon_btn.d.ts +3 -0
  152. package/ts/inputs/components/index.d.ts +2 -0
  153. package/ts/inputs/components/input_item.d.ts +0 -0
  154. package/ts/inputs/components/label.d.ts +0 -0
  155. package/ts/inputs/components/link.d.ts +0 -0
  156. package/ts/inputs/components/link_btn.d.ts +0 -0
  157. package/ts/inputs/components/prop_types/btn.d.ts +0 -0
  158. package/ts/inputs/components/prop_types/checkbox.d.ts +0 -0
  159. package/ts/inputs/components/prop_types/file.d.ts +0 -0
  160. package/ts/inputs/components/prop_types/group.d.ts +5 -0
  161. package/ts/inputs/components/prop_types/help.d.ts +0 -0
  162. package/ts/inputs/components/prop_types/help_btn.d.ts +0 -0
  163. package/ts/inputs/components/prop_types/hr.d.ts +0 -0
  164. package/ts/inputs/components/prop_types/icon_btn.d.ts +4 -0
  165. package/ts/inputs/components/prop_types/index.d.ts +2 -0
  166. package/ts/inputs/components/prop_types/input_item.d.ts +0 -0
  167. package/ts/inputs/components/prop_types/label.d.ts +0 -0
  168. package/ts/inputs/components/prop_types/link.d.ts +0 -0
  169. package/ts/inputs/components/prop_types/link_btn.d.ts +0 -0
  170. package/ts/inputs/components/prop_types/range.d.ts +0 -0
  171. package/ts/inputs/components/prop_types/section.d.ts +0 -0
  172. package/ts/inputs/components/prop_types/section_btn.d.ts +0 -0
  173. package/ts/inputs/components/prop_types/section_content.d.ts +0 -0
  174. package/ts/inputs/components/prop_types/select.d.ts +0 -0
  175. package/ts/inputs/components/prop_types/text.d.ts +0 -0
  176. package/ts/inputs/components/prop_types/text_btn.d.ts +0 -0
  177. package/ts/inputs/components/prop_types/textarea.d.ts +0 -0
  178. package/ts/inputs/components/prop_types/upload_box.d.ts +0 -0
  179. package/ts/inputs/components/range.d.ts +0 -0
  180. package/ts/inputs/components/section.d.ts +0 -0
  181. package/ts/inputs/components/section_btn.d.ts +0 -0
  182. package/ts/inputs/components/section_content.d.ts +0 -0
  183. package/ts/inputs/components/select.d.ts +0 -0
  184. package/ts/inputs/components/text.d.ts +0 -0
  185. package/ts/inputs/components/text_btn.d.ts +0 -0
  186. package/ts/inputs/components/textarea.d.ts +0 -0
  187. package/ts/inputs/components/upload_box.d.ts +0 -0
  188. package/ts/inputs/data/help.d.ts +0 -0
  189. package/ts/inputs/data/index.d.ts +0 -0
  190. package/ts/inputs/data/input_width.d.ts +0 -0
  191. package/ts/inputs/data/label.d.ts +0 -0
  192. package/ts/inputs/data/nested_input.d.ts +0 -0
  193. package/ts/inputs/data/text.d.ts +0 -0
  194. package/ts/inputs/data/upload_box.d.ts +0 -0
  195. package/ts/inputs/data/val.d.ts +1 -0
  196. package/ts/inputs/interfaces/icon_btns.d.ts +2 -0
  197. package/ts/inputs/interfaces/index.d.ts +1 -0
  198. package/ts/inputs/interfaces/input.d.ts +1 -1
  199. package/ts/inputs/interfaces/inputs.d.ts +0 -0
  200. package/ts/inputs/interfaces/links.d.ts +0 -0
  201. package/ts/inputs/interfaces/options.d.ts +0 -0
  202. package/ts/inputs/interfaces/sections.d.ts +0 -0
  203. package/ts/inputs/interfaces/state_cond.d.ts +0 -0
  204. package/ts/inputs/interfaces/text_btn.d.ts +1 -1
  205. package/ts/inputs/internal.d.ts +0 -0
  206. package/ts/inputs/obj/btn.d.ts +0 -0
  207. package/ts/inputs/obj/checkbox.d.ts +0 -0
  208. package/ts/inputs/obj/file.d.ts +0 -0
  209. package/ts/inputs/obj/group.d.ts +6 -0
  210. package/ts/inputs/obj/hr.d.ts +0 -0
  211. package/ts/inputs/obj/icon_btn.d.ts +6 -0
  212. package/ts/inputs/obj/index.d.ts +2 -0
  213. package/ts/inputs/obj/input_base.d.ts +0 -0
  214. package/ts/inputs/obj/link.d.ts +0 -0
  215. package/ts/inputs/obj/link_btn.d.ts +0 -0
  216. package/ts/inputs/obj/option.d.ts +0 -0
  217. package/ts/inputs/obj/range.d.ts +0 -0
  218. package/ts/inputs/obj/section.d.ts +0 -0
  219. package/ts/inputs/obj/select.d.ts +0 -0
  220. package/ts/inputs/obj/text.d.ts +0 -0
  221. package/ts/inputs/obj/textarea.d.ts +0 -0
  222. package/ts/inputs/obj/upload_box.d.ts +0 -0
  223. package/ts/inputs/scripts/index.d.ts +0 -0
  224. package/ts/inputs/scripts/resolve.d.ts +0 -0
  225. package/ts/inputs/scripts/upload_box.d.ts +0 -0
  226. package/ts/settings/components/body.d.ts +0 -0
  227. package/ts/settings/components/index.d.ts +0 -0
  228. package/ts/settings/components/prop_types/body.d.ts +0 -0
  229. package/ts/settings/components/prop_types/index.d.ts +0 -0
  230. package/ts/settings/data/back_up.d.ts +0 -0
  231. package/ts/settings/data/index.d.ts +0 -0
  232. package/ts/settings/data/sections.d.ts +4 -1
  233. package/ts/settings/init.d.ts +0 -0
  234. package/ts/settings/internal.d.ts +0 -0
  235. package/ts/settings/optional_permissions/data/index.d.ts +0 -0
  236. package/ts/settings/optional_permissions/data/main.d.ts +0 -0
  237. package/ts/settings/optional_permissions/interfaces/index.d.ts +0 -0
  238. package/ts/settings/optional_permissions/interfaces/optional_permission_checkbox_dict.d.ts +0 -0
  239. package/ts/settings/schema/data/index.d.ts +0 -0
  240. package/ts/settings/schema/data/main.d.ts +0 -0
  241. package/ts/settings/schema/obj/index.d.ts +0 -0
  242. package/ts/settings/schema/obj/transform_item.d.ts +0 -0
  243. package/ts/settings/scripts/index.d.ts +0 -0
  244. package/ts/settings/scripts/theme.d.ts +0 -0
  245. package/ts/shared/app.d.ts +2 -1
  246. package/ts/shared/app_ext_globals.d.ts +0 -0
  247. package/ts/shared/css_vars/scripts/index.d.ts +0 -0
  248. package/ts/shared/css_vars/scripts/main.d.ts +0 -0
  249. package/ts/shared/data/data/index.d.ts +0 -0
  250. package/ts/shared/data/data/main.d.ts +0 -0
  251. package/ts/shared/data/interfaces/index.d.ts +0 -0
  252. package/ts/shared/data/interfaces/val.d.ts +0 -0
  253. package/ts/shared/ext.d.ts +2 -2
  254. package/ts/shared/ext_version/components/body.d.ts +0 -0
  255. package/ts/shared/ext_version/components/index.d.ts +0 -0
  256. package/ts/shared/functions.d.ts +0 -0
  257. package/ts/shared/globals.d.ts +0 -0
  258. package/ts/shared/init.d.ts +0 -0
  259. package/ts/shared/internal.d.ts +2 -0
  260. package/ts/shared/loading_screen/components/body.d.ts +3 -2
  261. package/ts/shared/loading_screen/components/index.d.ts +0 -0
  262. package/ts/shared/loading_screen/components/prop_types/body.d.ts +4 -0
  263. package/ts/shared/loading_screen/components/prop_types/index.d.ts +1 -0
  264. package/ts/shared/loading_screen/data/index.d.ts +0 -0
  265. package/ts/shared/loading_screen/data/main.d.ts +0 -0
  266. package/ts/shared/no_tr/scripts/index.d.ts +0 -0
  267. package/ts/shared/no_tr/scripts/main.d.ts +0 -0
  268. package/ts/shared/svg.d.ts +0 -0
  269. package/ts/shared/t.d.ts +4 -0
  270. package/ts/shared/tab_index/interfaces/index.d.ts +0 -0
  271. package/ts/shared/tab_index/interfaces/set_Input_type_event.d.ts +0 -0
  272. package/ts/shared/tab_index/scripts/index.d.ts +0 -0
  273. package/ts/shared/tab_index/scripts/main.d.ts +0 -0
  274. package/ts/shared/theme/scripts/index.d.ts +0 -0
  275. package/ts/shared/theme/scripts/main.d.ts +1 -1
  276. package/ts/shared/title/scripts/index.d.ts +1 -0
  277. package/ts/shared/title/scripts/main.d.ts +6 -0
  278. package/ts/shared/tr/components/base_tr.d.ts +0 -0
  279. package/ts/shared/tr/components/index.d.ts +0 -0
  280. package/ts/shared/tr/components/prop_types/base_tr.d.ts +2 -0
  281. package/ts/shared/tr/components/prop_types/index.d.ts +0 -0
  282. package/ts/shared/tr/data/index.d.ts +0 -0
  283. package/ts/shared/tr/data/transition.d.ts +1 -1
  284. package/ts/shared/tr/interfaces/index.d.ts +0 -0
  285. package/ts/shared/tr/interfaces/transitions.d.ts +0 -0
  286. package/ts/shared/tr/obj/index.d.ts +0 -0
  287. package/ts/shared/tr/obj/transition.d.ts +0 -0
  288. package/ts/shared/utils/scripts/index.d.ts +0 -0
  289. package/ts/shared/utils/scripts/main.d.ts +0 -0
  290. package/ts/shared/vars.d.ts +0 -0
  291. package/ts/shared/viewport/scripts/index.d.ts +0 -0
  292. package/ts/shared/viewport/scripts/main.d.ts +0 -0
  293. package/ts/shared/x.d.ts +2 -4
  294. package/chunk-main-0288a9af.js +0 -9
  295. package/chunk-main-1e9aa0a8.js +0 -1
  296. package/chunk-main-ee84309e.js +0 -1
  297. package/js/ext/webpack.config.js +0 -111
@@ -1 +0,0 @@
1
- import{_ as __awaiter}from"./chunk-main-0288a9af.js";import"react";class Main$1{constructor(){this.cls="no_tr",this.enable=({el:el=document.head}={el:document.head})=>err((()=>{x.css(this.cls,el)}),"shr_1120"),this.disable=({el:el=document.head}={el:document.head})=>err_async((()=>__awaiter(this,void 0,void 0,(function*(){yield x.delay(500);const tr_link=sb(el,`.${this.cls}_link`);x.remove(tr_link)}))),"shr_1121")}static i(){return this.i0||(this.i0=new this)}}class Main{constructor(){this.set=({name:name,el:el=document.head,additional_theme_callback:additional_theme_callback})=>err((()=>{Main$1.i().enable({el:el});const name_final=`${name}_theme`,loading_screen_root_el=s('div[class^="root"][class*="loading_screen"]');x.css(name_final,el,"theme_link"),n(loading_screen_root_el)&&n(loading_screen_root_el.shadowRoot)&&x.css(name_final,loading_screen_root_el.shadowRoot,"theme_link"),n(additional_theme_callback)&&additional_theme_callback({name:name,el:el}),Main$1.i().disable({el:el})}),"shr_1129")}static i(){return this.i0||(this.i0=new this)}}export{Main$1 as M,Main as a};
@@ -1 +0,0 @@
1
- import{_ as __awaiter,o as observer,s as svg,B as Body$2,m as makeObservable,b as observable,d as action,r as runInAction,e as computed}from"./chunk-main-0288a9af.js";import React__default,{useEffect}from"react";global.show_err_ribbon=(error_obj,error_code,{error_msg_key:error_msg_key="",silent:silent=!1,persistent:persistent=!1,exit:exit=!1,hide_delay:hide_delay=Main$1.i().hide_delay,is_notification:is_notification=!1,notification_msg_key:notification_msg_key=""}={})=>Main$1.i().show_error(error_obj,error_code,{error_msg_key:error_msg_key,silent:silent,persistent:persistent,exit:exit,hide_delay:hide_delay,is_notification:is_notification,notification_msg_key:notification_msg_key}),global.err=(f,error_code,{error_msg_key:error_msg_key="",silent:silent=!1,persistent:persistent=!1,exit:exit=!1,hide_delay:hide_delay=Main$1.i().hide_delay}={})=>{try{return f()}catch(error_obj){Main$1.i().show_error(error_obj,error_code,{error_msg_key:error_msg_key,silent:silent,persistent:persistent,exit:exit,hide_delay:hide_delay})}},global.err_async=(f,error_code,{error_msg_key:error_msg_key="",silent:silent=!1,persistent:persistent=!1,exit:exit=!1,hide_delay:hide_delay=Main$1.i().hide_delay}={})=>__awaiter(void 0,void 0,void 0,(function*(){try{return yield f()}catch(error_obj){Main$1.i().show_error(error_obj,error_code,{error_msg_key:error_msg_key,silent:silent,persistent:persistent,exit:exit,hide_delay:hide_delay})}})),global.throw_err=msg=>{throw new Error(msg)},global.throw_err_obj=error_obj=>{throw error_obj},global.err_obj=msg=>new Error(msg);const Body$1=observer(class extends React__default.Component{static getDerivedStateFromError(){Visibility.i().show_reload_ui_screen()}componentDidCatch(err_obj){show_err_ribbon(err_obj,"shr_1000",{error_msg_key:"cant_render_ui"})}render(){if(Visibility.i().page_is_crashed)return React__default.createElement("div",{className:"reload_ui_btn_w"},React__default.createElement("button",{className:x.cls(["btn","reload_ui"]),type:"button",onClick:Page.i().reload},ext.msg("reload_ui_btn_text")));const{children:children}=this.props;return children}}),Body=observer((props=>(useEffect((()=>{const{app_id:app_id}=props;(class{constructor(){this.load=({app_id:app_id})=>{x.css("font_face",document.head,`font_face_link_${app_id}`);const error_root=s(`.error_${app_id}`);if(n(error_root)){const error_shadow=n(error_root.shadowRoot)?error_root.shadowRoot:void 0;if(error_shadow){const error_css=x.css("error",error_shadow);n(error_css)&&x.bind(error_css,"load",(()=>{State.i().change_state({observable_key:"is_loaded",state:!0})}))}}}}static i(){return this.i0||(this.i0=new this)}}).i().load({app_id:app_id})}),[props]),React__default.createElement("div",{className:x.cls(["main","error",State.i().is_highlighted_cls,State.i().is_notification_cls]),role:"none",style:{display:State.i().is_visible_style},onMouseDown:State.i().clear_all_reset_state_timeouts},React__default.createElement(ExtName,null),React__default.createElement(Msg$1,null),React__default.createElement(CloseBtn,null))))),CloseBtn=observer((()=>React__default.createElement("button",{className:"close_btn",type:"button",onClick:()=>State.i().change_state({observable_key:"is_visible",state:!1})},React__default.createElement(svg.Close,null)))),ExtName=()=>React__default.createElement("span",{className:"ext_name"},`${ext.msg("name")||we.runtime.getManifest().name} `,React__default.createElement(Body$2,null)),Msg$1=observer((()=>React__default.createElement("div",{className:"msg"},Msg.i().main_msg,State.i().is_notification?void 0:React__default.createElement(React__default.Fragment,null,React__default.createElement("button",{type:"button",className:x.cls(["more_info_btn",Msg.i().more_info_btn_is_visible_cls]),onClick:()=>Msg.i().change_visibility_of_advanced_msg({is_visible:!0})},ext.msg("error_more_info_btn_text")),React__default.createElement("div",{className:Msg.i().advanced_msg_is_visible_cls},Msg.i().advanced_msg)))));class Main$2{constructor(){this.catch_fatal_error=callback=>__awaiter(this,void 0,void 0,(function*(){if("background"===page)callback();else if(is_ext){(yield ext.send_msg_resp({msg:"check_if_background_page_is_available"}))&&callback()}else callback()}))}static i(){return this.i0||(this.i0=new this)}}class Visibility{constructor(){this.page_is_crashed=!1,this.show_reload_ui_screen=()=>{this.page_is_crashed=!0},makeObservable(this,{page_is_crashed:observable,show_reload_ui_screen:action})}static i(){return this.i0||(this.i0=new this)}}class Main$1{constructor(){this.hide_delay=5e3,this.highlight_time=300,this.show_error=(error_obj,error_code,{error_msg_key:error_msg_key="",silent:silent=!1,persistent:persistent=!1,exit:exit=!1,hide_delay:hide_delay=this.hide_delay,is_notification:is_notification=!1,notification_msg_key:notification_msg_key=""}={})=>{Main$2.i().catch_fatal_error((()=>{const error_ui_is_visible=!(x.in_service_worker||silent||error_obj&&error_obj.silent);if(error_ui_is_visible&&(is_notification?(State.i().change_state({observable_key:"is_notification",state:!0}),Msg.i().notification_msg_key=notification_msg_key):State.i().change_state({observable_key:"is_notification",state:!1}),State.i().change_state({observable_key:"is_visible",state:!0}),State.i().change_state({observable_key:"is_highlighted",state:!0}),State.i().clear_all_reset_state_timeouts(),error_obj&&error_obj.persistent||persistent||State.i().run_reset_state_timeout({observable_key:"is_visible",delay:hide_delay+this.highlight_time}),State.i().run_reset_state_timeout({observable_key:"is_highlighted",delay:this.highlight_time})),error_obj&&error_code){error_ui_is_visible&&Msg.i().change_visibility_of_advanced_msg({is_visible:!1});const error_msg_pre=ext.msg(`${error_obj.error_msg||error_msg_key}_error`),error_msg_final=error_msg_pre?` ${error_msg_pre}`:"";if(runInAction((()=>err((()=>{Msg.i().basic_msg=`${ext.msg("an_error_occured_msg")+error_msg_final}`,Msg.i().advanced_msg=`${ext.msg("error_code_label")+(error_obj.error_code||error_code)}\n${ext.msg("error_type_label")+error_obj.name}\n${ext.msg("error_msg_label")+error_obj.message}`}),"shr_1195"))),error_obj.exit||exit){const updated_error_obj=error_obj,set_updated_error_obj_propery=({key:key,undefined_property:undefined_property})=>{updated_error_obj[key]=n(error_obj[key])?error_obj[key]:undefined_property};throw set_updated_error_obj_propery({key:"error_code",undefined_property:error_code}),set_updated_error_obj_propery({key:"error_msg",undefined_property:error_msg_key}),set_updated_error_obj_propery({key:"silent",undefined_property:silent}),set_updated_error_obj_propery({key:"persistent",undefined_property:persistent}),set_updated_error_obj_propery({key:"exit",undefined_property:exit}),set_updated_error_obj_propery({key:"hide_delay",undefined_property:hide_delay}),updated_error_obj}this.output_error(error_obj,error_code)}}))},this.output_error=(error_obj,error_code)=>{const line="---------------------------",separator_bottom=`\n${line}`,error_code_and_msg=`${`${line}\n`}Code: ${error_code}\nMessage: ${error_obj.message}`,console_output=error_obj.stack?`${error_code_and_msg}\nStack: ${error_obj.stack+separator_bottom}`:error_code_and_msg+separator_bottom;console.error(console_output)},makeObservable(this,{show_error:action})}static i(){return this.i0||(this.i0=new this)}}class Msg{constructor(){this.advanced_msg_is_visible=!1,this.basic_msg="",this.advanced_msg="",this.notification_msg_key="",this.change_visibility_of_advanced_msg=({is_visible:is_visible})=>{this.advanced_msg_is_visible=is_visible},makeObservable(this,{advanced_msg_is_visible:observable,basic_msg:observable,advanced_msg:observable,notification_msg_key:observable,main_msg:computed,advanced_msg_is_visible_cls:computed,more_info_btn_is_visible_cls:computed,change_visibility_of_advanced_msg:action})}static i(){return this.i0||(this.i0=new this)}get advanced_msg_is_visible_cls(){return this.advanced_msg_is_visible?"":"none"}get more_info_btn_is_visible_cls(){return this.advanced_msg_is_visible?"none":""}get main_msg(){return State.i().is_notification?ext.msg(this.notification_msg_key):this.basic_msg}}class State{constructor(){this.is_loaded=!1,this.is_visible=!1,this.is_highlighted=!1,this.is_notification=!1,this.change_state=({observable_key:observable_key,state:state})=>{this[observable_key]=state},this.run_reset_state_timeout=({observable_key:observable_key,delay:delay})=>{this[`${observable_key}_timeout`]=global.setTimeout((()=>{this.change_state({observable_key:observable_key,state:!1})}),delay)},this.clear_all_reset_state_timeouts=()=>{n(this.is_visible_timeout)&&n(this.is_highlighted_timeout)&&(clearTimeout(this.is_visible_timeout),clearTimeout(this.is_highlighted_timeout))},makeObservable(this,{is_loaded:observable,is_visible:observable,is_highlighted:observable,is_notification:observable,is_visible_style:computed,is_highlighted_cls:computed,change_state:action})}static i(){return this.i0||(this.i0=new this)}get is_visible_style(){return this.is_loaded&&this.is_visible?"":"none"}get is_highlighted_cls(){return this.is_highlighted?"is_highlighted":""}get is_notification_cls(){return this.is_notification?"is_notification":""}}class Page{constructor(){this.reload=()=>{global.location.reload()}}static i(){return this.i0||(this.i0=new this)}}export{Body$1 as B,CloseBtn as C,ExtName as E,Main$1 as M,Visibility as V,Body as a,Msg$1 as b,Main$2 as c};
@@ -1,111 +0,0 @@
1
- const path = require('path');
2
-
3
- const shared_config = ({
4
- app_root,
5
- webpack,
6
- argv,
7
- env,
8
- MiniCssExtractPlugin,
9
- CssMinimizerPlugin,
10
- CopyWebpackPlugin,
11
- copy_patters,
12
- callback_begin,
13
- callback_done,
14
- }) => {
15
- const shared_path = path.join(
16
- app_root,
17
- 'node_modules',
18
- '@loftyshaky',
19
- 'shared',
20
- 'scss',
21
- 'shared',
22
- );
23
- const paths = {
24
- ts: path.join(app_root, 'src', 'ts'),
25
- embed: path.join(shared_path, 'embed'),
26
- themes: path.join(shared_path, 'themes', 'general'),
27
- };
28
-
29
- const copy_patterns_final = copy_patters || [];
30
-
31
- return {
32
- entry: {
33
- font_face: path.join(paths.embed, 'font_face.scss'),
34
- no_tr: path.join(paths.embed, 'no_tr.scss'),
35
- error: path.join(paths.embed, 'error.scss'),
36
- loading_screen: path.join(paths.embed, 'loading_screen.scss'),
37
- light_theme: path.join(paths.themes, 'light_theme.scss'),
38
- dark_theme: path.join(paths.themes, 'dark_theme.scss'),
39
- very_dark_theme: path.join(paths.themes, 'very_dark_theme.scss'),
40
- },
41
- output: {
42
- filename: '[name].js',
43
- chunkFilename: 'chunks/[name].js',
44
- path: path.join(app_root, 'dist'),
45
- publicPath: '',
46
- },
47
- resolve: {
48
- alias: {
49
- shared: path.join(paths.ts, 'shared'),
50
- background: path.join(paths.ts, 'background'),
51
- settings: path.join(paths.ts, 'settings'),
52
- content_script: path.join(paths.ts, 'content_script'),
53
- },
54
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
55
- },
56
- module: {
57
- rules: [
58
- {
59
- test: /\.(ts|tsx)$/,
60
- loader: 'ts-loader',
61
- },
62
- {
63
- test: /\.(scss)$/,
64
- use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
65
- },
66
- {
67
- test: /\.svg$/,
68
- use: ['@svgr/webpack'],
69
- },
70
- ],
71
- },
72
- plugins: [
73
- new webpack.ProgressPlugin(),
74
- new MiniCssExtractPlugin(),
75
- new CopyWebpackPlugin({
76
- patterns: [
77
- ...[
78
- {
79
- from: path.join(app_root, 'src', 'html'),
80
- },
81
- {
82
- from: path.join(app_root, 'src', 'icons', 'all'),
83
- },
84
- {
85
- from: path.join(app_root, 'src', 'icons', env.browser),
86
- },
87
- ],
88
- ...copy_patterns_final,
89
- ],
90
- }),
91
- {
92
- apply: (compiler) => {
93
- compiler.hooks.initialize.tap('initialize', callback_begin);
94
- compiler.hooks.done.tap('done', callback_done);
95
- },
96
- },
97
- ],
98
- target: 'web',
99
- devtool: false,
100
- optimization: {
101
- minimizer: [new CssMinimizerPlugin()],
102
- sideEffects: argv.mode === 'production',
103
- },
104
- performance: {
105
- maxEntrypointSize: 52428800,
106
- maxAssetSize: 52428800,
107
- },
108
- };
109
- };
110
-
111
- module.exports = { shared_config };