@syware/jlib 0.8.0 → 0.10.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.
Files changed (291) hide show
  1. package/README.md +19 -3
  2. package/dist/all.js +6 -3
  3. package/dist/atoms/jl-app-icon.css.js +3 -0
  4. package/dist/atoms/jl-app-icon.js +1 -1
  5. package/dist/atoms/jl-avatar.css.js +3 -0
  6. package/dist/atoms/jl-avatar.js +1 -1
  7. package/dist/atoms/jl-badge.css.js +3 -0
  8. package/dist/atoms/jl-badge.js +1 -1
  9. package/dist/atoms/jl-button.css.js +3 -0
  10. package/dist/atoms/jl-button.js +1 -1
  11. package/dist/atoms/jl-checkbox.css.js +3 -0
  12. package/dist/atoms/jl-checkbox.js +1 -1
  13. package/dist/atoms/jl-chip.css.js +3 -0
  14. package/dist/atoms/jl-chip.d.ts +1 -0
  15. package/dist/atoms/jl-chip.js +5 -3
  16. package/dist/atoms/jl-divider.css.js +3 -0
  17. package/dist/atoms/jl-divider.js +1 -1
  18. package/dist/atoms/jl-icon.css.js +3 -0
  19. package/dist/atoms/jl-icon.js +1 -1
  20. package/dist/atoms/jl-input.css.js +3 -0
  21. package/dist/atoms/jl-input.d.ts +2 -0
  22. package/dist/atoms/jl-input.js +10 -4
  23. package/dist/atoms/jl-kbd.css.js +3 -0
  24. package/dist/atoms/jl-kbd.js +1 -1
  25. package/dist/atoms/jl-link.css.js +3 -0
  26. package/dist/atoms/jl-link.js +1 -1
  27. package/dist/atoms/jl-loading-bar.css.js +3 -0
  28. package/dist/atoms/jl-loading-bar.d.ts +38 -0
  29. package/dist/atoms/jl-loading-bar.js +121 -0
  30. package/dist/atoms/jl-progress-ring.css.js +3 -0
  31. package/dist/atoms/jl-progress-ring.js +1 -1
  32. package/dist/atoms/jl-progress.css.js +3 -0
  33. package/dist/atoms/jl-progress.js +1 -1
  34. package/dist/atoms/jl-rating.css.js +3 -0
  35. package/dist/atoms/jl-rating.d.ts +2 -0
  36. package/dist/atoms/jl-rating.js +14 -6
  37. package/dist/atoms/jl-select.css.js +3 -0
  38. package/dist/atoms/jl-select.js +1 -1
  39. package/dist/atoms/jl-skeleton.css.js +3 -0
  40. package/dist/atoms/jl-skeleton.js +1 -1
  41. package/dist/atoms/jl-slider.css.js +3 -0
  42. package/dist/atoms/jl-slider.js +1 -1
  43. package/dist/atoms/jl-spinner.css.js +3 -0
  44. package/dist/atoms/jl-spinner.d.ts +2 -0
  45. package/dist/atoms/jl-spinner.js +7 -3
  46. package/dist/atoms/jl-switch.css.js +3 -0
  47. package/dist/atoms/jl-switch.js +1 -1
  48. package/dist/atoms/jl-textarea.css.js +3 -0
  49. package/dist/atoms/jl-textarea.js +1 -1
  50. package/dist/base/jl-element.d.ts +8 -0
  51. package/dist/base/jl-element.js +5 -0
  52. package/dist/index.d.ts +5 -1
  53. package/dist/index.js +5 -2
  54. package/dist/lib/flow.js +23 -6
  55. package/dist/lib/texts-de.d.ts +111 -0
  56. package/dist/lib/texts-de.js +114 -0
  57. package/dist/lib/texts-fr.d.ts +111 -0
  58. package/dist/lib/texts-fr.js +114 -0
  59. package/dist/lib/texts.d.ts +180 -91
  60. package/dist/lib/texts.js +177 -9
  61. package/dist/molecules/jl-accordion-item.css.js +3 -0
  62. package/dist/molecules/jl-accordion-item.js +1 -1
  63. package/dist/molecules/jl-accordion.css.js +3 -0
  64. package/dist/molecules/jl-accordion.js +1 -1
  65. package/dist/molecules/jl-account-button.css.js +3 -0
  66. package/dist/molecules/jl-account-button.js +1 -1
  67. package/dist/molecules/jl-alert.css.js +3 -0
  68. package/dist/molecules/jl-alert.d.ts +1 -0
  69. package/dist/molecules/jl-alert.js +5 -3
  70. package/dist/molecules/jl-avatar-group.css.js +3 -0
  71. package/dist/molecules/jl-avatar-group.js +1 -1
  72. package/dist/molecules/jl-breadcrumb.css.js +3 -0
  73. package/dist/molecules/jl-breadcrumb.d.ts +2 -0
  74. package/dist/molecules/jl-breadcrumb.js +13 -7
  75. package/dist/molecules/jl-calendar.css.js +3 -0
  76. package/dist/molecules/jl-calendar.d.ts +1 -0
  77. package/dist/molecules/jl-calendar.js +8 -5
  78. package/dist/molecules/jl-card.css.js +3 -0
  79. package/dist/molecules/jl-card.js +1 -1
  80. package/dist/molecules/jl-chip-group.css.js +3 -0
  81. package/dist/molecules/jl-chip-group.d.ts +1 -0
  82. package/dist/molecules/jl-chip-group.js +5 -2
  83. package/dist/molecules/jl-code-block.css.js +3 -0
  84. package/dist/molecules/jl-code-block.js +2 -2
  85. package/dist/molecules/jl-combobox.css.js +3 -0
  86. package/dist/molecules/jl-combobox.d.ts +3 -1
  87. package/dist/molecules/jl-combobox.js +13 -8
  88. package/dist/molecules/jl-copy-button.css.js +3 -0
  89. package/dist/molecules/jl-copy-button.d.ts +1 -0
  90. package/dist/molecules/jl-copy-button.js +8 -6
  91. package/dist/molecules/jl-date-picker.css.js +3 -0
  92. package/dist/molecules/jl-date-picker.d.ts +1 -0
  93. package/dist/molecules/jl-date-picker.js +11 -8
  94. package/dist/molecules/jl-empty.css.js +3 -0
  95. package/dist/molecules/jl-empty.js +1 -1
  96. package/dist/molecules/jl-facts.css.js +3 -0
  97. package/dist/molecules/jl-facts.js +1 -1
  98. package/dist/molecules/jl-field.css.js +3 -0
  99. package/dist/molecules/jl-field.js +1 -1
  100. package/dist/molecules/jl-file-drop.css.js +3 -0
  101. package/dist/molecules/jl-file-drop.d.ts +1 -0
  102. package/dist/molecules/jl-file-drop.js +16 -7
  103. package/dist/molecules/jl-input-list.css.js +3 -0
  104. package/dist/molecules/jl-input-list.d.ts +3 -2
  105. package/dist/molecules/jl-input-list.js +11 -8
  106. package/dist/molecules/jl-list-item.css.js +3 -0
  107. package/dist/molecules/jl-list-item.js +1 -1
  108. package/dist/molecules/jl-load-more.css.js +3 -0
  109. package/dist/molecules/jl-load-more.d.ts +4 -2
  110. package/dist/molecules/jl-load-more.js +16 -9
  111. package/dist/molecules/jl-load-state.css.js +3 -0
  112. package/dist/molecules/jl-load-state.d.ts +13 -0
  113. package/dist/molecules/jl-load-state.js +63 -12
  114. package/dist/molecules/jl-menu.css.js +3 -0
  115. package/dist/molecules/jl-menu.js +1 -1
  116. package/dist/molecules/jl-number-input.css.js +3 -0
  117. package/dist/molecules/jl-number-input.d.ts +1 -0
  118. package/dist/molecules/jl-number-input.js +7 -4
  119. package/dist/molecules/jl-pagination.css.js +3 -0
  120. package/dist/molecules/jl-pagination.d.ts +2 -0
  121. package/dist/molecules/jl-pagination.js +18 -10
  122. package/dist/molecules/jl-popover.css.js +3 -0
  123. package/dist/molecules/jl-popover.js +1 -1
  124. package/dist/molecules/jl-radio-group.css.js +3 -0
  125. package/dist/molecules/jl-radio-group.d.ts +1 -0
  126. package/dist/molecules/jl-radio-group.js +5 -2
  127. package/dist/molecules/jl-search-button.css.js +3 -0
  128. package/dist/molecules/jl-search-button.d.ts +2 -1
  129. package/dist/molecules/jl-search-button.js +7 -5
  130. package/dist/molecules/jl-search.css.js +3 -0
  131. package/dist/molecules/jl-search.d.ts +2 -0
  132. package/dist/molecules/jl-search.js +10 -4
  133. package/dist/molecules/jl-segmented.css.js +3 -0
  134. package/dist/molecules/jl-segmented.js +1 -1
  135. package/dist/molecules/jl-stat.css.js +3 -0
  136. package/dist/molecules/jl-stat.js +1 -1
  137. package/dist/molecules/jl-steps.css.js +3 -0
  138. package/dist/molecules/jl-steps.d.ts +2 -0
  139. package/dist/molecules/jl-steps.js +10 -5
  140. package/dist/molecules/jl-tab-panel.css.js +3 -0
  141. package/dist/molecules/jl-tab-panel.js +1 -1
  142. package/dist/molecules/jl-tabs.css.js +3 -0
  143. package/dist/molecules/jl-tabs.js +1 -1
  144. package/dist/molecules/jl-tag-input.css.js +3 -0
  145. package/dist/molecules/jl-tag-input.d.ts +1 -0
  146. package/dist/molecules/jl-tag-input.js +9 -5
  147. package/dist/molecules/jl-timeline.css.js +3 -0
  148. package/dist/molecules/jl-timeline.js +1 -1
  149. package/dist/molecules/jl-toast.css.js +3 -0
  150. package/dist/molecules/jl-toast.d.ts +1 -0
  151. package/dist/molecules/jl-toast.js +5 -3
  152. package/dist/molecules/jl-tooltip.css.js +3 -0
  153. package/dist/molecules/jl-tooltip.js +1 -1
  154. package/dist/organisms/jl-command-palette.css.js +3 -0
  155. package/dist/organisms/jl-command-palette.d.ts +3 -1
  156. package/dist/organisms/jl-command-palette.js +23 -15
  157. package/dist/organisms/jl-confirm.css.js +3 -0
  158. package/dist/organisms/jl-confirm.d.ts +3 -0
  159. package/dist/organisms/jl-confirm.js +13 -12
  160. package/dist/organisms/jl-dialog.css.js +3 -0
  161. package/dist/organisms/jl-dialog.d.ts +1 -0
  162. package/dist/organisms/jl-dialog.js +5 -3
  163. package/dist/organisms/jl-drawer.css.js +3 -0
  164. package/dist/organisms/jl-drawer.d.ts +1 -0
  165. package/dist/organisms/jl-drawer.js +5 -3
  166. package/dist/organisms/jl-flow.css.js +3 -0
  167. package/dist/organisms/jl-flow.d.ts +2 -0
  168. package/dist/organisms/jl-flow.js +26 -17
  169. package/dist/organisms/jl-navbar.css.js +3 -0
  170. package/dist/organisms/jl-navbar.d.ts +3 -0
  171. package/dist/organisms/jl-navbar.js +17 -8
  172. package/dist/organisms/jl-page-header.css.js +3 -0
  173. package/dist/organisms/jl-page-header.js +1 -1
  174. package/dist/organisms/jl-page-outlet.css.js +3 -0
  175. package/dist/organisms/jl-page-outlet.d.ts +34 -0
  176. package/dist/organisms/jl-page-outlet.js +107 -0
  177. package/dist/organisms/jl-side-nav.css.js +3 -0
  178. package/dist/organisms/jl-side-nav.d.ts +4 -2
  179. package/dist/organisms/jl-side-nav.js +18 -12
  180. package/dist/organisms/jl-tab-bar.css.js +3 -0
  181. package/dist/organisms/jl-tab-bar.d.ts +1 -0
  182. package/dist/organisms/jl-tab-bar.js +6 -3
  183. package/dist/organisms/jl-table.css.js +3 -0
  184. package/dist/organisms/jl-table.d.ts +2 -1
  185. package/dist/organisms/jl-table.js +10 -7
  186. package/dist/organisms/jl-toaster.css.js +3 -0
  187. package/dist/organisms/jl-toaster.d.ts +2 -1
  188. package/dist/organisms/jl-toaster.js +13 -10
  189. package/dist/organisms/jl-tree.css.js +3 -0
  190. package/dist/organisms/jl-tree.d.ts +6 -4
  191. package/dist/organisms/jl-tree.js +22 -16
  192. package/dist/styles/base.css.js +3 -0
  193. package/dist/styles/control.css.js +3 -0
  194. package/dist/styles/floating.css.js +3 -0
  195. package/dist/styles/shared.js +4 -4
  196. package/dist/styles/tokens.css.js +3 -0
  197. package/dist/templates/jl-app-shell.css.js +3 -0
  198. package/dist/templates/jl-app-shell.d.ts +1 -0
  199. package/dist/templates/jl-app-shell.js +5 -3
  200. package/dist/templates/jl-auth-layout.css.js +3 -0
  201. package/dist/templates/jl-auth-layout.d.ts +4 -3
  202. package/dist/templates/jl-auth-layout.js +14 -12
  203. package/dist/templates/jl-page.css.js +3 -0
  204. package/dist/templates/jl-page.d.ts +1 -0
  205. package/dist/templates/jl-page.js +5 -2
  206. package/dist/templates/jl-split-view.css.js +3 -0
  207. package/dist/templates/jl-split-view.d.ts +1 -0
  208. package/dist/templates/jl-split-view.js +6 -5
  209. package/dist/templates/jl-stack.css.js +3 -0
  210. package/dist/templates/jl-stack.d.ts +17 -0
  211. package/dist/templates/jl-stack.js +36 -0
  212. package/dist/types/jl-stack.types.d.ts +2 -0
  213. package/dist/types/texts.types.d.ts +29 -4
  214. package/package.json +5 -4
  215. package/dist/atoms/jl-app-icon.css_raw.js +0 -3
  216. package/dist/atoms/jl-avatar.css_raw.js +0 -3
  217. package/dist/atoms/jl-badge.css_raw.js +0 -3
  218. package/dist/atoms/jl-button.css_raw.js +0 -3
  219. package/dist/atoms/jl-checkbox.css_raw.js +0 -3
  220. package/dist/atoms/jl-chip.css_raw.js +0 -3
  221. package/dist/atoms/jl-divider.css_raw.js +0 -3
  222. package/dist/atoms/jl-icon.css_raw.js +0 -3
  223. package/dist/atoms/jl-input.css_raw.js +0 -3
  224. package/dist/atoms/jl-kbd.css_raw.js +0 -3
  225. package/dist/atoms/jl-link.css_raw.js +0 -3
  226. package/dist/atoms/jl-progress-ring.css_raw.js +0 -3
  227. package/dist/atoms/jl-progress.css_raw.js +0 -3
  228. package/dist/atoms/jl-rating.css_raw.js +0 -3
  229. package/dist/atoms/jl-select.css_raw.js +0 -3
  230. package/dist/atoms/jl-skeleton.css_raw.js +0 -3
  231. package/dist/atoms/jl-slider.css_raw.js +0 -3
  232. package/dist/atoms/jl-spinner.css_raw.js +0 -3
  233. package/dist/atoms/jl-switch.css_raw.js +0 -3
  234. package/dist/atoms/jl-textarea.css_raw.js +0 -3
  235. package/dist/molecules/jl-accordion-item.css_raw.js +0 -3
  236. package/dist/molecules/jl-accordion.css_raw.js +0 -3
  237. package/dist/molecules/jl-account-button.css_raw.js +0 -3
  238. package/dist/molecules/jl-alert.css_raw.js +0 -3
  239. package/dist/molecules/jl-avatar-group.css_raw.js +0 -3
  240. package/dist/molecules/jl-breadcrumb.css_raw.js +0 -3
  241. package/dist/molecules/jl-calendar.css_raw.js +0 -3
  242. package/dist/molecules/jl-card.css_raw.js +0 -3
  243. package/dist/molecules/jl-chip-group.css_raw.js +0 -3
  244. package/dist/molecules/jl-code-block.css_raw.js +0 -3
  245. package/dist/molecules/jl-combobox.css_raw.js +0 -3
  246. package/dist/molecules/jl-copy-button.css_raw.js +0 -3
  247. package/dist/molecules/jl-date-picker.css_raw.js +0 -3
  248. package/dist/molecules/jl-empty.css_raw.js +0 -3
  249. package/dist/molecules/jl-facts.css_raw.js +0 -3
  250. package/dist/molecules/jl-field.css_raw.js +0 -3
  251. package/dist/molecules/jl-file-drop.css_raw.js +0 -3
  252. package/dist/molecules/jl-input-list.css_raw.js +0 -3
  253. package/dist/molecules/jl-list-item.css_raw.js +0 -3
  254. package/dist/molecules/jl-load-more.css_raw.js +0 -3
  255. package/dist/molecules/jl-load-state.css_raw.js +0 -3
  256. package/dist/molecules/jl-menu.css_raw.js +0 -3
  257. package/dist/molecules/jl-number-input.css_raw.js +0 -3
  258. package/dist/molecules/jl-pagination.css_raw.js +0 -3
  259. package/dist/molecules/jl-popover.css_raw.js +0 -3
  260. package/dist/molecules/jl-radio-group.css_raw.js +0 -3
  261. package/dist/molecules/jl-search-button.css_raw.js +0 -3
  262. package/dist/molecules/jl-search.css_raw.js +0 -3
  263. package/dist/molecules/jl-segmented.css_raw.js +0 -3
  264. package/dist/molecules/jl-stat.css_raw.js +0 -3
  265. package/dist/molecules/jl-steps.css_raw.js +0 -3
  266. package/dist/molecules/jl-tab-panel.css_raw.js +0 -3
  267. package/dist/molecules/jl-tabs.css_raw.js +0 -3
  268. package/dist/molecules/jl-tag-input.css_raw.js +0 -3
  269. package/dist/molecules/jl-timeline.css_raw.js +0 -3
  270. package/dist/molecules/jl-toast.css_raw.js +0 -3
  271. package/dist/molecules/jl-tooltip.css_raw.js +0 -3
  272. package/dist/organisms/jl-command-palette.css_raw.js +0 -3
  273. package/dist/organisms/jl-confirm.css_raw.js +0 -3
  274. package/dist/organisms/jl-dialog.css_raw.js +0 -3
  275. package/dist/organisms/jl-drawer.css_raw.js +0 -3
  276. package/dist/organisms/jl-flow.css_raw.js +0 -3
  277. package/dist/organisms/jl-navbar.css_raw.js +0 -3
  278. package/dist/organisms/jl-page-header.css_raw.js +0 -3
  279. package/dist/organisms/jl-side-nav.css_raw.js +0 -3
  280. package/dist/organisms/jl-tab-bar.css_raw.js +0 -3
  281. package/dist/organisms/jl-table.css_raw.js +0 -3
  282. package/dist/organisms/jl-toaster.css_raw.js +0 -3
  283. package/dist/organisms/jl-tree.css_raw.js +0 -3
  284. package/dist/styles/base.css_raw.js +0 -3
  285. package/dist/styles/control.css_raw.js +0 -3
  286. package/dist/styles/floating.css_raw.js +0 -3
  287. package/dist/styles/tokens.css_raw.js +0 -3
  288. package/dist/templates/jl-app-shell.css_raw.js +0 -3
  289. package/dist/templates/jl-auth-layout.css_raw.js +0 -3
  290. package/dist/templates/jl-page.css_raw.js +0 -3
  291. package/dist/templates/jl-split-view.css_raw.js +0 -3
@@ -1,13 +1,13 @@
1
+ import { jlText } from "../lib/texts.js";
1
2
  import { BASE_STYLES } from "../styles/shared.js";
2
3
  import { JlElement } from "../base/jl-element.js";
3
4
  import { jsonOf, textOf } from "../lib/attributes.js";
4
5
  import { registerIcons } from "../lib/icons.js";
5
- import { jlText } from "../lib/texts.js";
6
6
  import { JlIcon } from "../atoms/jl-icon.js";
7
7
  import { setOrRemove, uniqueId } from "../lib/dom.js";
8
8
  import { JlButton } from "../atoms/jl-button.js";
9
9
  import { findItem, firstLeaf, pathInSections } from "../lib/nav-tree.js";
10
- import jl_side_nav_default from "./jl-side-nav.css_raw.js";
10
+ import jl_side_nav_default from "./jl-side-nav.css.js";
11
11
  import { css } from "@jadis/core";
12
12
  import { ChevronRight, PanelLeftClose, PanelLeftOpen } from "lucide";
13
13
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -60,19 +60,17 @@ var JlSideNav = class extends JlElement {
60
60
  }, { attribute: "collapsed" });
61
61
  /** Adds a button at the bottom that folds the side nav into its rail and unfolds it. */
62
62
  collapsible = this.useChange(false, () => this.renderFold(), { attribute: "collapsible" });
63
- /** The fold button's text while the side nav is open. */
64
- collapseLabel = this.useChange(jlText("collapseMenu"), () => this.renderFold(), { attribute: "collapse-label" });
65
- /** Its hint while the side nav is a rail. */
66
- expandLabel = this.useChange(jlText("expandMenu"), () => this.renderFold(), { attribute: "expand-label" });
63
+ /** The fold button's text while the side nav is open; jlib's own when empty. */
64
+ collapseLabel = this.useChange("", () => this.renderFold(), { attribute: "collapse-label" });
65
+ /** Its hint while the side nav is a rail; jlib's own when empty. */
66
+ expandLabel = this.useChange("", () => this.renderFold(), { attribute: "expand-label" });
67
67
  /**
68
68
  * Set by `jl-app-shell` while the side nav is its drawer, on a narrow screen: the drawer shows it whole, and its
69
69
  * fold button hides, `collapsed` waiting for a wide screen again.
70
70
  */
71
71
  inDrawer = this.useChange(false, () => this.renderRail(), { attribute: "in-drawer" });
72
72
  /** The name of the navigation for screen readers. */
73
- label = this.useChange(jlText("mainNavigation"), (value) => {
74
- this._refs.nav.setAttribute("aria-label", value === "" ? jlText("mainNavigation") : value);
75
- }, { attribute: "label" });
73
+ label = this.useChange("", () => this.renderLabel(), { attribute: "label" });
76
74
  _prefix = uniqueId("jl-side-nav");
77
75
  /** The parents people opened, or that hold the active item. */
78
76
  _state = { open: /* @__PURE__ */ new Set() };
@@ -144,13 +142,21 @@ var JlSideNav = class extends JlElement {
144
142
  this.render();
145
143
  this.renderFold();
146
144
  }
145
+ drawTexts() {
146
+ this.renderLabel();
147
+ this.renderFold();
148
+ this.render();
149
+ }
150
+ renderLabel() {
151
+ this._refs.nav.setAttribute("aria-label", this.label.get() || jlText("mainNavigation"));
152
+ }
147
153
  renderFold() {
148
154
  const fold = this._refs.fold;
149
155
  const rail = this.isRail();
150
156
  fold.hidden = !this.collapsible.get() || this.inDrawer.get();
151
157
  fold.icon.set(rail ? EXPAND_ICON : COLLAPSE_ICON);
152
- fold.label.set(rail ? "" : this.collapseLabel.get());
153
- fold.hint.set(rail ? this.expandLabel.get() : "");
158
+ fold.label.set(rail ? "" : this.collapseLabel.get() || jlText("collapseMenu"));
159
+ fold.hint.set(rail ? this.expandLabel.get() || jlText("expandMenu") : "");
154
160
  }
155
161
  choose(id) {
156
162
  this.value.set(id);
@@ -225,7 +231,7 @@ var JlSideNav = class extends JlElement {
225
231
  class: "expander",
226
232
  type: "button",
227
233
  "data-id": item.id,
228
- "aria-label": `Show the pages of ${item.label}`,
234
+ "aria-label": jlText("showPagesOf", { name: item.label }),
229
235
  "aria-controls": childrenId,
230
236
  children: /* @__PURE__ */ jsx(JlIcon, {
231
237
  name: "chevron-right",
@@ -0,0 +1,3 @@
1
+ // src/organisms/jl-tab-bar.css?inline
2
+ var jl_tab_bar_default = ":host{--height:60px;display:block}nav{min-height:var(--height);padding-bottom:env(safe-area-inset-bottom);border-top:1px solid var(--jl-line);background:var(--jl-surface);grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;display:grid}.items{display:contents}.item{min-width:0;color:var(--jl-muted);cursor:pointer;transition:color var(--jl-fast) var(--jl-ease);background:0 0;border:none;flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:6px 2px;font-size:11px;font-weight:600;line-height:1.4;text-decoration:none;display:flex}.item:hover{color:var(--jl-text)}.item[aria-current=page]{color:var(--jl-accent)}.item:focus-visible{box-shadow:none}.icon{border-radius:var(--jl-radius-pill);width:52px;height:28px;transition:background var(--jl-fast) var(--jl-ease);place-items:center;display:inline-grid;position:relative}.item:focus-visible .icon{box-shadow:var(--jl-focus-ring)}.item[aria-current=page] .icon{background:var(--jl-accent-soft)}.label{text-overflow:ellipsis;white-space:nowrap;max-width:100%;padding:0 2px;overflow:hidden}.badge{border:2px solid var(--jl-surface);border-radius:var(--jl-radius-pill);background:var(--jl-accent);min-width:18px;height:18px;color:var(--jl-on-accent);text-align:center;padding:0 5px;font-size:10px;font-weight:700;line-height:14px;position:absolute;top:-4px;left:calc(50% + 4px)}";
3
+ export { jl_tab_bar_default as default };
@@ -35,6 +35,7 @@ export declare class JlTabBar<Id extends string = string> extends JlElement {
35
35
  private readonly _refs;
36
36
  templateHtml(): Node;
37
37
  templateCss(): string;
38
+ protected drawTexts(): void;
38
39
  onConnect(): void;
39
40
  private onClick;
40
41
  private render;
@@ -1,11 +1,11 @@
1
+ import { jlText } from "../lib/texts.js";
1
2
  import { BASE_STYLES } from "../styles/shared.js";
2
3
  import { JlElement } from "../base/jl-element.js";
3
4
  import { jsonOf, textOf } from "../lib/attributes.js";
4
5
  import { registerIcons } from "../lib/icons.js";
5
- import { jlText } from "../lib/texts.js";
6
6
  import { JlIcon } from "../atoms/jl-icon.js";
7
7
  import { setOrRemove } from "../lib/dom.js";
8
- import jl_tab_bar_default from "./jl-tab-bar.css_raw.js";
8
+ import jl_tab_bar_default from "./jl-tab-bar.css.js";
9
9
  import { css } from "@jadis/core";
10
10
  import { Ellipsis } from "lucide";
11
11
  import { Fragment, jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -50,7 +50,7 @@ var JlTabBar = class extends JlElement {
50
50
  this._refs.more.hidden = value === "";
51
51
  }, { attribute: "more" });
52
52
  /** The name of the navigation for screen readers. */
53
- label = this.useChange(jlText("shortcuts"), (value) => this._refs.nav.setAttribute("aria-label", value === "" ? jlText("shortcuts") : value), { attribute: "label" });
53
+ label = this.useChange("", () => this.drawTexts(), { attribute: "label" });
54
54
  _refs = this.useRefs((ref) => ({
55
55
  items: ref(".items"),
56
56
  more: ref(".more"),
@@ -77,6 +77,9 @@ var JlTabBar = class extends JlElement {
77
77
  templateCss() {
78
78
  return css`${BASE_STYLES}${jl_tab_bar_default}`;
79
79
  }
80
+ drawTexts() {
81
+ this._refs.nav.setAttribute("aria-label", this.label.get() || jlText("shortcuts"));
82
+ }
80
83
  onConnect() {
81
84
  this.on(this._refs.items, "click", (event) => this.onClick(event));
82
85
  this.on(this._refs.more, "click", () => this.events.emit("more"));
@@ -0,0 +1,3 @@
1
+ // src/organisms/jl-table.css?inline
2
+ var jl_table_default = ":host{contain:inline-size;--max-height:none;--cell-y:10px;--cell-x:14px;--select-width:44px;--expand-width:36px;--lead:0px;display:block}:host([expandable]){--lead:var(--expand-width)}:host([expandable][selectable]){--expand-width:28px;--lead:calc(var(--select-width) + var(--expand-width))}:host([dense]){--cell-y:6px;--cell-x:12px}.scroll{max-height:var(--max-height);border:1px solid var(--jl-line);border-radius:var(--jl-radius);background:var(--jl-surface);overscroll-behavior-x:contain;overflow:auto}:host([expandable]) .scroll{container-type:inline-size}table{border-collapse:separate;border-spacing:0;width:100%;color:var(--jl-text);font-size:var(--jl-font-md);line-height:20px}th,td{padding:var(--cell-y) var(--cell-x);white-space:nowrap;vertical-align:middle}th{z-index:1;border-bottom:1px solid var(--jl-line);background:var(--jl-surface-2);color:var(--jl-muted);font-size:var(--jl-font-xs);letter-spacing:.01em;text-align:left;font-weight:600;position:sticky;top:0}td{border-top:1px solid var(--jl-line-soft)}tbody tr:first-child td{border-top:none}tbody tr.empty td{padding:40px var(--cell-x);color:var(--jl-muted);text-align:center}tbody tr.detail td{padding:0 var(--cell-x) calc(var(--cell-y) + 6px) calc(var(--lead) + var(--cell-x));white-space:normal;cursor:auto;border-top:none}.detail-body{left:calc(var(--lead) + var(--cell-x));max-width:calc(100cqi - var(--lead) - 2 * var(--cell-x));position:sticky}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.sort{border-radius:var(--jl-radius-xs);color:inherit;font-weight:inherit;letter-spacing:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;margin:-2px -4px;padding:2px 4px;display:inline-flex}.sort:hover{color:var(--jl-text)}.sort-icon{color:var(--jl-faint)}th[data-sorted]{color:var(--jl-text)}th[data-sorted] .sort-icon{color:var(--jl-accent)}tbody tr[data-selected] td,tbody tr[data-marked] td{background:var(--jl-accent-soft)}tbody tr[data-marked] td:first-child{box-shadow:inset 3px 0 0 var(--jl-accent)}tbody tr:not(.empty,.skeleton,.detail,[data-selected]):hover td,:host([striped]) tbody tr:nth-child(2n of :where(:not(.detail))):not(.empty,[data-selected],[data-marked]) td{background:var(--jl-surface-2)}:host([striped]) tbody tr:not(.empty,.skeleton,.detail,[data-selected]):hover td{background:var(--jl-surface-3)}:host([striped]) tbody tr:nth-child(2n of :where(:not(.detail))):not([data-selected],[data-marked])+.detail td{background:var(--jl-surface-2)}.format-number{font-variant-numeric:tabular-nums}td.wrap{white-space:normal;overflow-wrap:anywhere;min-width:160px}.format-date{color:var(--jl-text-2);font-variant-numeric:tabular-nums}code{border-radius:var(--jl-radius-xs);background:var(--jl-code-bg);font-size:var(--jl-font-xs);padding:2px 6px}.select-cell{width:var(--select-width);padding-right:0;line-height:0}.expand-cell{width:var(--expand-width);padding-right:0;padding-left:calc(var(--cell-x) - 4px);line-height:0}.select-cell+.expand-cell{padding-left:0}:host([expandable]) tbody tr[data-index]{cursor:pointer}.expand{border-radius:var(--jl-radius-xs);width:24px;height:24px;color:var(--jl-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;margin:-2px 0;padding:0;display:inline-flex}.expand:hover{color:var(--jl-text)}.chevron{transition:rotate var(--jl-fast) var(--jl-ease)}.expand[aria-expanded=true] .chevron{rotate:90deg}.check{display:inline-flex;position:relative}.checkbox{border:1.5px solid var(--jl-line-strong);background:var(--jl-surface);cursor:pointer;appearance:none;width:16px;height:16px;transition:background var(--jl-fast) var(--jl-ease), border-color var(--jl-fast) var(--jl-ease);border-radius:4px;margin:0}.checkbox:hover{border-color:var(--jl-muted)}.checkbox:checked,.checkbox:indeterminate{border-color:var(--jl-accent);background:var(--jl-accent)}.checkbox:disabled{cursor:not-allowed;opacity:.5}.mark{pointer-events:none;position:absolute;inset:0}.checkbox:checked+.mark:after{border:solid var(--jl-on-accent);content:\"\";border-width:0 2px 2px 0;width:5px;height:9px;position:absolute;top:2.5px;left:5.5px;rotate:45deg}.checkbox:indeterminate+.mark:after{background:var(--jl-on-accent);content:\"\";border-radius:1px;height:2px;position:absolute;top:7px;left:4px;right:4px}.empty-content{align-items:center;gap:8px;display:inline-flex}.empty jl-icon{color:var(--jl-faint)}.bone{border-radius:var(--jl-radius-pill);background:linear-gradient(90deg, var(--jl-surface-3) 30%, var(--jl-surface-2) 50%, var(--jl-surface-3) 70%) 0 0 / 300% 100%;vertical-align:middle;width:70%;max-width:160px;height:10px;animation:1.4s linear infinite shimmer;display:inline-block}.bone.box{border-radius:4px;width:16px;height:16px}tbody tr.skeleton:nth-child(3n+2) .bone:not(.box){width:50%}tbody tr.skeleton:nth-child(3n) .bone:not(.box){width:85%}@media (prefers-reduced-motion:reduce){.bone{animation:none}}@keyframes shimmer{0%{background-position:100% 0}to{background-position:0 0}}.cell-description{color:var(--jl-muted);font-size:var(--jl-font-xs);margin-top:2px}";
3
+ export { jl_table_default as default };
@@ -82,7 +82,7 @@ export declare class JlTable<Row extends object = TableRow, Extra extends string
82
82
  get(): string;
83
83
  set(setter: string | ((prevState: string) => string)): void;
84
84
  }>>;
85
- /** What the table says when it has no rows. */
85
+ /** What the table says when it has no rows; jlib's own text when empty. */
86
86
  readonly emptyText: Readonly<Readonly<{
87
87
  get(): string;
88
88
  set(setter: string | ((prevState: string) => string)): void;
@@ -116,6 +116,7 @@ export declare class JlTable<Row extends object = TableRow, Extra extends string
116
116
  templateCss(): string;
117
117
  onConnect(): void;
118
118
  /** Draws on the next microtask: the inputs set while connecting give one drawing, not one each. */
119
+ protected drawTexts(): void;
119
120
  private schedule;
120
121
  private flush;
121
122
  private sortBy;
@@ -1,14 +1,14 @@
1
+ import { jlText } from "../lib/texts.js";
1
2
  import { BASE_STYLES } from "../styles/shared.js";
2
3
  import { JlElement } from "../base/jl-element.js";
3
4
  import { jsonOf, oneOf, textOf } from "../lib/attributes.js";
4
5
  import { registerIcons } from "../lib/icons.js";
5
6
  import { columnAlign, columnWidth, fieldOf, formatCell, nextSortDirection, openRows, rowKeyOf, rowToggles, selectionState, sortRows, toggleAll, toggleKey, withRowOpen } from "../lib/table.js";
6
- import { jlText } from "../lib/texts.js";
7
7
  import { JlIcon } from "../atoms/jl-icon.js";
8
8
  import { setOrRemove } from "../lib/dom.js";
9
9
  import { JlBadge } from "../atoms/jl-badge.js";
10
10
  import { startedOnControl } from "../lib/surface.js";
11
- import jl_table_default from "./jl-table.css_raw.js";
11
+ import jl_table_default from "./jl-table.css.js";
12
12
  import { css } from "@jadis/core";
13
13
  import { ArrowDown, ArrowUp, ChevronRight, ChevronsUpDown, Inbox } from "lucide";
14
14
  import { Fragment, jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -156,8 +156,8 @@ var JlTable = class extends JlElement {
156
156
  striped = this.useChange(false, (value) => this.reflect("striped", value), { attribute: "striped" });
157
157
  /** A CSS height past which the rows scroll under the header: `320px`, `50vh`; a number is pixels. */
158
158
  maxHeight = this.useChange("", (value) => this.renderMaxHeight(value), { attribute: "max-height" });
159
- /** What the table says when it has no rows. */
160
- emptyText = this.useChange(jlText("noData"), () => this.schedule("body"), { attribute: "empty-text" });
159
+ /** What the table says when it has no rows; jlib's own text when empty. */
160
+ emptyText = this.useChange("", () => this.schedule("body"), { attribute: "empty-text" });
161
161
  /** Shows placeholder rows while the data loads. */
162
162
  loading = this.useChange(false, (value) => {
163
163
  this.reflect("loading", value);
@@ -222,6 +222,9 @@ var JlTable = class extends JlElement {
222
222
  this.on(this._refs.body, "click", (event) => this.pressRow(event));
223
223
  }
224
224
  /** Draws on the next microtask: the inputs set while connecting give one drawing, not one each. */
225
+ drawTexts() {
226
+ this.schedule("head", "body");
227
+ }
225
228
  schedule(...parts) {
226
229
  for (const part of parts) this._pending[part] = true;
227
230
  if (this._pending.queued) return;
@@ -294,7 +297,7 @@ var JlTable = class extends JlElement {
294
297
  const selectAll = this.selectable.get() ? /* @__PURE__ */ jsx("th", {
295
298
  class: "select-cell",
296
299
  scope: "col",
297
- children: checkbox("Select all rows", null)
300
+ children: checkbox(jlText("selectAllRows"), null)
298
301
  }) : null;
299
302
  const details = this.isExpandable() ? /* @__PURE__ */ jsx("th", {
300
303
  class: "expand-cell",
@@ -374,7 +377,7 @@ var JlTable = class extends JlElement {
374
377
  const name = first === void 0 ? String(index + 1) : formatCell(fieldOf(row, first.key), first.format);
375
378
  const select = this.selectable.get() ? /* @__PURE__ */ jsx("td", {
376
379
  class: "select-cell",
377
- children: checkbox(`Select ${name}`, index)
380
+ children: checkbox(jlText("selectNamed", { name }), index)
378
381
  }) : null;
379
382
  const chevron = this.isExpandable() ? /* @__PURE__ */ jsx("td", {
380
383
  class: "expand-cell",
@@ -449,7 +452,7 @@ var JlTable = class extends JlElement {
449
452
  children: [/* @__PURE__ */ jsx(JlIcon, {
450
453
  name: "inbox",
451
454
  size: EMPTY_ICON_SIZE
452
- }), /* @__PURE__ */ jsx("span", { children: this.emptyText.get() })]
455
+ }), /* @__PURE__ */ jsx("span", { children: this.emptyText.get() || jlText("noData") })]
453
456
  })
454
457
  })
455
458
  });
@@ -0,0 +1,3 @@
1
+ // src/organisms/jl-toaster.css?inline
2
+ var jl_toaster_default = ":host{--edge:16px;--width:380px;display:contents}.region{--bottom:var(--edge-bottom,calc(var(--edge) + var(--jl-shell-bottom,0px)));width:min(var(--width), calc(100vw - 2 * var(--edge)));color:var(--jl-text);pointer-events:none;background:0 0;border:none;flex-direction:column;gap:10px;margin:0;padding:0;display:flex;position:fixed;inset:auto;overflow:visible}.region:not(:popover-open){display:none}::slotted(*){pointer-events:auto}::slotted([data-stacked]){display:none}:host([placement=bottom-right]) .region{right:var(--edge);bottom:var(--bottom)}:host([placement=bottom-left]) .region{bottom:var(--bottom);left:var(--edge)}:host([placement=bottom-center]) .region{bottom:var(--bottom);left:50%;translate:-50%}:host([placement^=top]) .region{top:var(--edge);flex-direction:column-reverse}:host([placement^=top]) ::slotted(*){--jl-toast-enter:-8px}:host([placement=top-right]) .region{right:var(--edge)}:host([placement=top-center]) .region{left:50%;translate:-50%}";
3
+ export { jl_toaster_default as default };
@@ -31,6 +31,7 @@ export declare class JlToaster extends JlElement {
31
31
  notify(options: ToastOptions): ToastHandle;
32
32
  templateHtml(): Node;
33
33
  templateCss(): string;
34
+ protected drawTexts(): void;
34
35
  onConnect(): void;
35
36
  onDisconnect(): void;
36
37
  private toasts;
@@ -49,7 +50,7 @@ export declare class JlToaster extends JlElement {
49
50
  * Returns a handle to close it early.
50
51
  */
51
52
  export declare function toast(options: ToastOptions): ToastHandle;
52
- /** A download's texts, in the language the page set (`setTexts`): what `download()` says unless told otherwise. */
53
+ /** A download's texts, in jlib's language, their placeholders left to fill: what `download()` says unless told otherwise. */
53
54
  export declare const downloadTexts: () => DownloadTexts;
54
55
  /**
55
56
  * Downloads a file with its progress in a toast of the page's toaster: the time the server takes to prepare it,
@@ -1,14 +1,14 @@
1
+ import { fillText } from "../lib/text.js";
2
+ import { jlTemplate, jlText } from "../lib/texts.js";
1
3
  import { BASE_STYLES } from "../styles/shared.js";
2
4
  import { JlElement } from "../base/jl-element.js";
3
5
  import { clampedNumber, oneOf } from "../lib/attributes.js";
4
6
  import { registerIcons } from "../lib/icons.js";
5
7
  import { formatDuration } from "../lib/time.js";
6
- import { fillText } from "../lib/text.js";
7
- import { jlText } from "../lib/texts.js";
8
8
  import { formatFileSize } from "../lib/files.js";
9
9
  import { JlToast } from "../molecules/jl-toast.js";
10
10
  import { answerError, dispositionFileName, readWithProgress, saveBlob, urlFileName } from "../lib/download.js";
11
- import jl_toaster_default from "./jl-toaster.css_raw.js";
11
+ import jl_toaster_default from "./jl-toaster.css.js";
12
12
  import { css } from "@jadis/core";
13
13
  import { Download } from "lucide";
14
14
  import { jsx } from "@jadis/core/jsx-runtime";
@@ -63,7 +63,7 @@ var JlToaster = class extends JlElement {
63
63
  parse: clampedNumber(DEFAULT_MAX, 1, MAX_LIMIT)
64
64
  });
65
65
  /** The region's name for screen readers. */
66
- label = this.useChange(jlText("notifications"), (value) => this._refs.region.setAttribute("aria-label", value), { attribute: "label" });
66
+ label = this.useChange("", () => this.drawTexts(), { attribute: "label" });
67
67
  _watched = /* @__PURE__ */ new WeakSet();
68
68
  _refs = this.useRefs((ref) => ({
69
69
  region: ref(".region"),
@@ -110,6 +110,9 @@ var JlToaster = class extends JlElement {
110
110
  templateCss() {
111
111
  return css`${BASE_STYLES}${jl_toaster_default}`;
112
112
  }
113
+ drawTexts() {
114
+ this._refs.region.setAttribute("aria-label", this.label.get() || jlText("notifications"));
115
+ }
113
116
  onConnect() {
114
117
  this.renderStack();
115
118
  this.on(this._refs.slot, "slotchange", () => this.renderStack());
@@ -185,14 +188,14 @@ var PERCENT = 100;
185
188
  var FALLBACK_NAME = "download";
186
189
  var CONTENT_LENGTH = "content-length";
187
190
  var CONTENT_DISPOSITION = "content-disposition";
188
- /** A download's texts, in the language the page set (`setTexts`): what `download()` says unless told otherwise. */
191
+ /** A download's texts, in jlib's language, their placeholders left to fill: what `download()` says unless told otherwise. */
189
192
  var downloadTexts = () => ({
190
193
  cancel: jlText("downloadCancel"),
191
- failed: jlText("downloadFailed"),
192
- preparing: jlText("downloadPreparing"),
193
- received: jlText("downloadReceived"),
194
- receivedOf: jlText("downloadReceivedOf"),
195
- saved: jlText("downloadSaved")
194
+ failed: jlTemplate("downloadFailed"),
195
+ preparing: jlTemplate("downloadPreparing"),
196
+ received: jlTemplate("downloadReceived"),
197
+ receivedOf: jlTemplate("downloadReceivedOf"),
198
+ saved: jlTemplate("downloadSaved")
196
199
  });
197
200
  /** The toast's text and bar for the bytes received: a share of the size when the server said it. */
198
201
  function receiving(received, total, texts) {
@@ -0,0 +1,3 @@
1
+ // src/organisms/jl-tree.css?inline
2
+ var jl_tree_default = ":host{--indent:16px;--row-height:30px;display:block}.tree{color:var(--jl-text-2);font-size:var(--jl-font-md)}.group{position:relative}.group:before{top:0;bottom:4px;left:calc(8px + var(--level) * var(--indent) + 6.5px);background:var(--jl-line);content:\"\";width:1px;position:absolute}.item:focus-visible{box-shadow:none}.row{height:var(--row-height);padding:0 8px 0 calc(8px + var(--level) * var(--indent));border-radius:var(--jl-radius-sm);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:6px;display:flex}.row:hover{background:var(--jl-surface-2);color:var(--jl-text)}.item:focus-visible>.row{box-shadow:var(--jl-focus-ring)}.item[aria-selected=true]>.row{background:var(--jl-accent-soft);color:var(--jl-text);font-weight:600}.chevron{width:14px;color:var(--jl-faint);transition:rotate var(--jl-fast) var(--jl-ease);flex:none;justify-content:center;display:inline-flex}.item[aria-expanded=true]>.row>.chevron{rotate:90deg}.icon{color:var(--jl-muted)}.item[aria-selected=true]>.row>.icon{color:var(--jl-accent)}.label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}a.row{color:inherit;text-decoration:none}.item.level-end>.row{color:var(--jl-muted)}.level-end[aria-disabled=true]>.row{cursor:default}.level-end[aria-disabled=true]>.row:hover{background:0 0}.spinner{color:var(--jl-muted);flex:none}.more,.retry{color:var(--jl-accent);flex:none;font-weight:500}.level-end>.row:hover .more,.level-end>.row:hover .retry{color:var(--jl-accent-strong)}.icon.error{color:var(--jl-danger)}.note{min-height:var(--row-height);padding:0 8px 0 calc(8px + var(--level) * var(--indent));color:var(--jl-muted);align-items:center;gap:6px;display:flex}.badge{color:var(--jl-faint);font-size:var(--jl-font-xs);font-variant-numeric:tabular-nums;flex:none;margin-left:auto}";
3
+ export { jl_tree_default as default };
@@ -41,22 +41,22 @@ export declare class JlTree extends JlElement {
41
41
  get(): string;
42
42
  set(setter: string | ((prevState: string) => string)): void;
43
43
  }>>;
44
- /** Said while a page loads. */
44
+ /** Said while a page loads; jlib's own text when empty. */
45
45
  readonly loadingText: Readonly<Readonly<{
46
46
  get(): string;
47
47
  set(setter: string | ((prevState: string) => string)): void;
48
48
  }>>;
49
- /** The button that loads a level's next page; `{count}` is how many items are left. */
49
+ /** The button that loads a level's next page, `{count}` being how many items are left; jlib's own when empty. */
50
50
  readonly moreText: Readonly<Readonly<{
51
51
  get(): string;
52
52
  set(setter: string | ((prevState: string) => string)): void;
53
53
  }>>;
54
- /** Said where a page could not be loaded. */
54
+ /** Said where a page could not be loaded; jlib's own text when empty. */
55
55
  readonly errorText: Readonly<Readonly<{
56
56
  get(): string;
57
57
  set(setter: string | ((prevState: string) => string)): void;
58
58
  }>>;
59
- /** The action that loads it again. */
59
+ /** The action that loads it again; jlib's own text when empty. */
60
60
  readonly retryLabel: Readonly<Readonly<{
61
61
  get(): string;
62
62
  set(setter: string | ((prevState: string) => string)): void;
@@ -109,6 +109,8 @@ export declare class JlTree extends JlElement {
109
109
  private openFolder;
110
110
  private levelEnd;
111
111
  private hasLevelEndRow;
112
+ protected drawTexts(): void;
113
+ private errorLabel;
112
114
  private renderItems;
113
115
  private itemNode;
114
116
  /** The row that ends a level, if it has one. */
@@ -1,14 +1,14 @@
1
+ import { pageLocale } from "../lib/locale.js";
2
+ import { jlTemplate, jlText } from "../lib/texts.js";
1
3
  import { BASE_STYLES } from "../styles/shared.js";
2
4
  import { JlElement } from "../base/jl-element.js";
3
5
  import { jsonOf } from "../lib/attributes.js";
4
6
  import { registerIcons } from "../lib/icons.js";
5
- import { jlText } from "../lib/texts.js";
6
7
  import { JlIcon } from "../atoms/jl-icon.js";
7
8
  import { isModifiedClick, setOrRemove, uniqueId } from "../lib/dom.js";
8
9
  import { JlSpinner } from "../atoms/jl-spinner.js";
9
- import { pageLocale } from "../lib/locale.js";
10
10
  import { allItems, childrenOf, isFolder, treeKeyAction, withExpanded, withExtraRows, withPage } from "../lib/tree.js";
11
- import jl_tree_default from "./jl-tree.css_raw.js";
11
+ import jl_tree_default from "./jl-tree.css.js";
12
12
  import { css } from "@jadis/core";
13
13
  import { ChevronRight, CircleAlert, File, Folder, FolderOpen } from "lucide";
14
14
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -61,14 +61,14 @@ var JlTree = class extends JlElement {
61
61
  label = this.useChange("", (value) => setOrRemove(this._refs.tree, "aria-label", value), { attribute: "label" });
62
62
  /** What an empty tree says, such as "No object yet"; none by default. */
63
63
  emptyText = this.useChange("", () => this.renderItems(), { attribute: "empty-text" });
64
- /** Said while a page loads. */
65
- loadingText = this.useChange(jlText("loadingMore"), () => this.renderItems(), { attribute: "loading-text" });
66
- /** The button that loads a level's next page; `{count}` is how many items are left. */
67
- moreText = this.useChange(jlText("showMoreCount"), () => this.renderItems(), { attribute: "more-text" });
68
- /** Said where a page could not be loaded. */
69
- errorText = this.useChange(jlText("loadError"), () => this.renderItems(), { attribute: "error-text" });
70
- /** The action that loads it again. */
71
- retryLabel = this.useChange(jlText("retry"), () => this.renderItems(), { attribute: "retry-label" });
64
+ /** Said while a page loads; jlib's own text when empty. */
65
+ loadingText = this.useChange("", () => this.renderItems(), { attribute: "loading-text" });
66
+ /** The button that loads a level's next page, `{count}` being how many items are left; jlib's own when empty. */
67
+ moreText = this.useChange("", () => this.renderItems(), { attribute: "more-text" });
68
+ /** Said where a page could not be loaded; jlib's own text when empty. */
69
+ errorText = this.useChange("", () => this.renderItems(), { attribute: "error-text" });
70
+ /** The action that loads it again; jlib's own text when empty. */
71
+ retryLabel = this.useChange("", () => this.renderItems(), { attribute: "retry-label" });
72
72
  _source = { loader: null };
73
73
  _rows = /* @__PURE__ */ new Map();
74
74
  _focus = { id: "" };
@@ -245,7 +245,7 @@ var JlTree = class extends JlElement {
245
245
  if (generation !== this._loading.generation) return;
246
246
  const total = this._loading.levels.get(parent)?.total ?? 0;
247
247
  this._loading.levels.set(parent, {
248
- error: messageOf(error) || this.errorText.get(),
248
+ error: messageOf(error) || this.errorLabel(),
249
249
  pending: null,
250
250
  total
251
251
  });
@@ -277,6 +277,12 @@ var JlTree = class extends JlElement {
277
277
  const end = this.levelEnd(parent);
278
278
  return end !== "none" && end !== "empty";
279
279
  }
280
+ drawTexts() {
281
+ this.renderItems();
282
+ }
283
+ errorLabel() {
284
+ return this.errorText.get() || jlText("loadError");
285
+ }
280
286
  renderItems() {
281
287
  const hadFocus = this.hasFocusInside();
282
288
  this._rows.clear();
@@ -379,7 +385,7 @@ var JlTree = class extends JlElement {
379
385
  return node;
380
386
  }
381
387
  loadingNode(parent, level) {
382
- const text = this.loadingText.get();
388
+ const text = this.loadingText.get() || jlText("loadingMore");
383
389
  return this.levelEndRow(parent, level, [/* @__PURE__ */ jsx(JlSpinner, {
384
390
  class: "spinner",
385
391
  size: ICON_SIZE,
@@ -392,7 +398,7 @@ var JlTree = class extends JlElement {
392
398
  }
393
399
  moreNode(parent, level) {
394
400
  const left = (this._loading.levels.get(parent)?.total ?? 0) - childrenOf(this.items.get(), parent).length;
395
- const text = this.moreText.get().replace(COUNT_PLACEHOLDER, left.toLocaleString(pageLocale()));
401
+ const text = (this.moreText.get() || jlTemplate("showMoreCount")).replace(COUNT_PLACEHOLDER, left.toLocaleString(pageLocale()));
396
402
  return this.levelEndRow(parent, level, [/* @__PURE__ */ jsx("span", {
397
403
  class: "label more",
398
404
  children: text
@@ -407,11 +413,11 @@ var JlTree = class extends JlElement {
407
413
  }),
408
414
  /* @__PURE__ */ jsx("span", {
409
415
  class: "label",
410
- children: this.errorText.get()
416
+ children: this.errorLabel()
411
417
  }),
412
418
  /* @__PURE__ */ jsx("span", {
413
419
  class: "retry",
414
- children: this.retryLabel.get()
420
+ children: this.retryLabel.get() || jlText("retry")
415
421
  })
416
422
  ], false);
417
423
  setOrRemove(node, "title", this._loading.levels.get(parent)?.error ?? "");
@@ -0,0 +1,3 @@
1
+ // src/styles/base.css?inline
2
+ var base_default = ":host{box-sizing:border-box;font-family:var(--jl-font-sans);-webkit-tap-highlight-color:transparent}:host([hidden]){display:none!important}*,:before,:after{box-sizing:inherit}[hidden]{display:none!important}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{box-shadow:var(--jl-focus-ring);outline:none}h1,h2,h3,h4,p,ul,ol,figure{margin:0}code,kbd,pre{font-family:var(--jl-font-mono)}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important}}";
3
+ export { base_default as default };
@@ -0,0 +1,3 @@
1
+ // src/styles/control.css?inline
2
+ var control_default = ".control{width:100%;min-height:var(--height,var(--jl-control-md));border:1px solid var(--jl-line-strong);border-radius:var(--jl-radius-sm);background:var(--jl-surface);color:var(--jl-text);font-size:var(--jl-control-font);transition:border-color var(--jl-fast) var(--jl-ease), box-shadow var(--jl-fast) var(--jl-ease);align-items:center;gap:8px;padding:0 12px;line-height:20px;display:flex}.control:hover{border-color:color-mix(in srgb, var(--jl-line-strong) 60%, var(--jl-text) 18%)}.control:focus-within{border-color:var(--jl-accent);box-shadow:var(--jl-focus-ring)}:host([invalid]) .control{border-color:var(--jl-danger)}:host([invalid]) .control:focus-within{box-shadow:0 0 0 3px color-mix(in srgb, var(--jl-danger) 25%, transparent)}:host([disabled]) .control,:host(:disabled) .control{background:var(--jl-surface-2);color:var(--jl-muted);cursor:not-allowed}:host([size=sm]){--height:var(--jl-control-sm)}:host([size=lg]){--height:var(--jl-control-lg)}.native{min-width:0;height:calc(var(--height,var(--jl-control-md)) - 2px);color:inherit;font:inherit;background:0 0;border:none;outline:none;flex:1;padding:0}.native::placeholder{color:var(--jl-faint)}.native:focus-visible{box-shadow:none}.native:disabled{cursor:not-allowed}.adornment{color:var(--jl-faint);flex:none;align-items:center;display:inline-flex}.action{border-radius:var(--jl-radius-xs);width:24px;height:24px;color:var(--jl-faint);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;margin-right:-4px;padding:0;display:inline-flex}.action:hover{background:var(--jl-surface-3);color:var(--jl-text)}";
3
+ export { control_default as default };
@@ -0,0 +1,3 @@
1
+ // src/styles/floating.css?inline
2
+ var floating_default = ".floating{color:var(--jl-text);background:0 0;border:none;margin:0;padding:0;position:fixed;inset:auto;overflow:visible}.floating:popover-open{animation:jl-float-in var(--jl-fast) var(--jl-ease)}.panel{border:1px solid var(--jl-line);border-radius:var(--jl-radius);background:var(--jl-surface);box-shadow:var(--jl-shadow-lg)}@keyframes jl-float-in{0%{opacity:0;transform:translateY(-2px)scale(.98)}}";
3
+ export { floating_default as default };
@@ -1,7 +1,7 @@
1
- import base_default from "./base.css_raw.js";
2
- import control_default from "./control.css_raw.js";
3
- import floating_default from "./floating.css_raw.js";
4
- import tokens_default from "./tokens.css_raw.js";
1
+ import base_default from "./base.css.js";
2
+ import control_default from "./control.css.js";
3
+ import floating_default from "./floating.css.js";
4
+ import tokens_default from "./tokens.css.js";
5
5
  // src/styles/shared.ts
6
6
  /** First in every shadow root. */
7
7
  var BASE_STYLES = base_default;
@@ -0,0 +1,3 @@
1
+ // src/styles/tokens.css?inline
2
+ var tokens_default = "@layer jlib{:root,[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--jl-font-sans:\"Manrope Variable\", \"Manrope\", system-ui, -apple-system, \"Segoe UI\", sans-serif;--jl-font-mono:\"JetBrains Mono Variable\", \"JetBrains Mono\", ui-monospace, \"SF Mono\", Menlo, monospace;--jl-font-xs:12px;--jl-font-sm:13px;--jl-font-md:14px;--jl-font-lg:16px;--jl-font-xl:20px;--jl-font-2xl:28px;--jl-text:#0b0b0c;--jl-text-2:#3a3f47;--jl-muted:#5b616b;--jl-faint:#8a9099;--jl-bg:#fff;--jl-surface:#fff;--jl-surface-2:#f7f8f9;--jl-surface-3:#eef0f2;--jl-code-bg:#f0f2f4;--jl-line:#e6e8eb;--jl-line-soft:#eef0f2;--jl-line-strong:#d5d9de;--jl-brand:#0e88d3;--jl-accent:#0c72b0;--jl-accent-strong:#095a8b;--jl-accent-soft:#e9f4fb;--jl-accent-line:#b7dbf2;--jl-on-accent:#fff;--jl-on-brand:#fff;--jl-ok:#17784a;--jl-ok-soft:#ecf6f0;--jl-warn:#9a5b00;--jl-warn-soft:#fcf4e6;--jl-danger:#b42318;--jl-danger-soft:#fdf0ef;--jl-on-danger:#fff;--jl-info:#0c72b0;--jl-info-soft:#e9f4fb;--jl-code-keyword:#0c72b0;--jl-code-tag:#095a8b;--jl-code-attribute:#5b48c8;--jl-code-string:#17784a;--jl-code-number:#9a5b00;--jl-code-function:#3d5a80;--jl-code-property:#127a72;--jl-code-comment:#8a9099;--jl-radius-xs:6px;--jl-radius-sm:8px;--jl-radius:10px;--jl-radius-lg:12px;--jl-radius-xl:20px;--jl-radius-pill:999px;--jl-space-1:4px;--jl-space-2:8px;--jl-space-3:12px;--jl-space-4:16px;--jl-space-5:20px;--jl-space-6:24px;--jl-space-8:32px;--jl-space-10:40px;--jl-space-12:48px;--jl-space-16:64px;--jl-control-sm:30px;--jl-control-md:36px;--jl-control-lg:44px;--jl-control-font:var(--jl-font-md);--jl-page-form:720px;--jl-page-standard:1120px;--jl-page-wide:1400px;--jl-shadow-sm:0 1px 2px #0b0b0c0d;--jl-shadow:0 6px 16px -6px #0b0b0c1f;--jl-shadow-lg:0 18px 44px -14px #0b0b0c38;--jl-focus-ring:0 0 0 3px color-mix(in srgb, var(--jl-brand) 35%, transparent);--jl-scrim:#0b0b0c61;--jl-ease:cubic-bezier(.2, .7, .2, 1);--jl-fast:.12s;--jl-slow:.24s}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--jl-text:#eceef1;--jl-text-2:#c3c8cf;--jl-muted:#959ca6;--jl-faint:#6b727c;--jl-bg:#0f1113;--jl-surface:#0f1113;--jl-surface-2:#16191c;--jl-surface-3:#1d2125;--jl-code-bg:#1d2125;--jl-line:#262a2f;--jl-line-soft:#1f2327;--jl-line-strong:#343a41;--jl-brand:#1a9be0;--jl-accent:#3ea6e8;--jl-accent-strong:#6cc0f2;--jl-accent-soft:#0f2a3b;--jl-accent-line:#1e4a66;--jl-on-accent:#04131c;--jl-ok:#4cc38a;--jl-ok-soft:#10261c;--jl-warn:#e5a54b;--jl-warn-soft:#2a2012;--jl-danger:#f0786c;--jl-danger-soft:#3a1a17;--jl-on-danger:#1c0604;--jl-info:#3ea6e8;--jl-info-soft:#0f2a3b;--jl-code-keyword:#3ea6e8;--jl-code-tag:#6cc0f2;--jl-code-attribute:#a99bf0;--jl-code-string:#4cc38a;--jl-code-number:#e5a54b;--jl-code-function:#8fb0d6;--jl-code-property:#4fc1b5;--jl-code-comment:#6b727c;--jl-shadow-sm:0 1px 2px #0006;--jl-shadow:0 6px 18px -6px #0009;--jl-shadow-lg:0 18px 44px -12px #000000b3;--jl-scrim:#0000008c}}[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--jl-text:#eceef1;--jl-text-2:#c3c8cf;--jl-muted:#959ca6;--jl-faint:#6b727c;--jl-bg:#0f1113;--jl-surface:#0f1113;--jl-surface-2:#16191c;--jl-surface-3:#1d2125;--jl-code-bg:#1d2125;--jl-line:#262a2f;--jl-line-soft:#1f2327;--jl-line-strong:#343a41;--jl-brand:#1a9be0;--jl-accent:#3ea6e8;--jl-accent-strong:#6cc0f2;--jl-accent-soft:#0f2a3b;--jl-accent-line:#1e4a66;--jl-on-accent:#04131c;--jl-ok:#4cc38a;--jl-ok-soft:#10261c;--jl-warn:#e5a54b;--jl-warn-soft:#2a2012;--jl-danger:#f0786c;--jl-danger-soft:#3a1a17;--jl-on-danger:#1c0604;--jl-info:#3ea6e8;--jl-info-soft:#0f2a3b;--jl-code-keyword:#3ea6e8;--jl-code-tag:#6cc0f2;--jl-code-attribute:#a99bf0;--jl-code-string:#4cc38a;--jl-code-number:#e5a54b;--jl-code-function:#8fb0d6;--jl-code-property:#4fc1b5;--jl-code-comment:#6b727c;--jl-shadow-sm:0 1px 2px #0006;--jl-shadow:0 6px 18px -6px #0009;--jl-shadow-lg:0 18px 44px -12px #000000b3;--jl-scrim:#0000008c}@media (pointer:coarse){:root,[data-theme=light],[data-theme=dark]{--jl-control-sm:36px;--jl-control-md:44px;--jl-control-lg:48px;--jl-control-font:16px}}}";
3
+ export { tokens_default as default };
@@ -0,0 +1,3 @@
1
+ // src/templates/jl-app-shell.css?inline
2
+ var jl_app_shell_default = ":host{--header-height:56px;--drawer-width:min(300px, 86%);height:100%;min-height:0;display:block;container:jl-app-shell/inline-size}.shell{background:var(--jl-bg);height:100%;color:var(--jl-text);grid-template:\"top top top\"\"nav main aside\"minmax(0,1fr)/auto minmax(0,1fr) auto;display:grid;position:relative;overflow:hidden}.top{min-height:var(--header-height);border-bottom:1px solid var(--jl-line);background:var(--jl-surface);grid-area:top;align-items:center;gap:8px;padding:0 16px;display:flex}:host(:not([has-header])) .top,:host([narrow-header]) .top{display:none}::slotted([slot=header]){flex:1;min-width:0}.menu{width:var(--jl-control-md);height:var(--jl-control-md);border-radius:var(--jl-radius-sm);color:var(--jl-text-2);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;margin-left:-8px;padding:0;display:none}.menu:hover{background:var(--jl-surface-3);color:var(--jl-text)}.nav{border-right:1px solid var(--jl-line);background:var(--jl-surface);grid-area:nav;min-height:0;overflow-y:auto}.nav:focus-visible{box-shadow:none}:host(:not([has-nav])) .nav{display:none}.main{isolation:isolate;grid-area:main;min-width:0;min-height:0;overflow:auto}.aside{border-left:1px solid var(--jl-line);background:var(--jl-surface);grid-area:aside;min-height:0;overflow-y:auto}:host(:not([has-aside])) .aside,.tabs,.scrim{display:none}@container jl-app-shell (width<960px){.shell{grid-template:\"top\"\"main\"minmax(0,1fr)\"tabs\"/minmax(0,1fr)}:host([has-tabs]) .tabs{grid-area:tabs;display:block}:host([has-nav]) .top,:host([narrow-header][has-header]) .top{display:flex}:host([has-nav]) .menu{display:inline-flex}.nav{z-index:2;max-width:var(--drawer-width);box-shadow:var(--jl-shadow-lg);visibility:hidden;transition:transform var(--jl-slow) var(--jl-ease), visibility 0s linear var(--jl-slow);position:absolute;top:0;bottom:0;left:0;transform:translate(-100%)}:host([nav-open]) .nav{visibility:visible;transition:transform var(--jl-slow) var(--jl-ease);transform:none}.scrim{z-index:1;background:var(--jl-scrim);opacity:0;pointer-events:none;transition:opacity var(--jl-slow) var(--jl-ease);display:block;position:absolute;inset:0}:host([nav-open]) .scrim{opacity:1;pointer-events:auto}.aside{display:none}}";
3
+ export { jl_app_shell_default as default };
@@ -33,6 +33,7 @@ export declare class JlAppShell extends JlElement {
33
33
  toggleNav(force?: boolean): void;
34
34
  templateHtml(): Node;
35
35
  templateCss(): string;
36
+ protected drawTexts(): void;
36
37
  onConnect(): void;
37
38
  onDisconnect(): void;
38
39
  /** Tells the page how much the tab bar covers at the bottom of the window, while it shows. */
@@ -1,10 +1,10 @@
1
+ import { jlText } from "../lib/texts.js";
1
2
  import { BASE_STYLES } from "../styles/shared.js";
2
3
  import { JlElement } from "../base/jl-element.js";
3
4
  import { registerIcons } from "../lib/icons.js";
4
- import { jlText } from "../lib/texts.js";
5
5
  import { JlIcon } from "../atoms/jl-icon.js";
6
6
  import { watchSizes } from "../lib/resize.js";
7
- import jl_app_shell_default from "./jl-app-shell.css_raw.js";
7
+ import jl_app_shell_default from "./jl-app-shell.css.js";
8
8
  import { css } from "@jadis/core";
9
9
  import { Menu } from "lucide";
10
10
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -71,7 +71,6 @@ var JlAppShell = class extends JlElement {
71
71
  children: [/* @__PURE__ */ jsx("button", {
72
72
  class: "menu",
73
73
  type: "button",
74
- "aria-label": jlText("navigation"),
75
74
  "aria-expanded": "false",
76
75
  "aria-controls": "nav",
77
76
  children: /* @__PURE__ */ jsx(JlIcon, {
@@ -109,6 +108,9 @@ var JlAppShell = class extends JlElement {
109
108
  templateCss() {
110
109
  return css`${BASE_STYLES}${jl_app_shell_default}`;
111
110
  }
111
+ drawTexts() {
112
+ this._refs.menu.setAttribute("aria-label", jlText("navigation"));
113
+ }
112
114
  onConnect() {
113
115
  this._resize.observe(this);
114
116
  this._resize.observe(this._refs.tabs);
@@ -0,0 +1,3 @@
1
+ // src/templates/jl-auth-layout.css?inline
2
+ var jl_auth_layout_default = ":host{min-height:var(--min-height,100dvh);display:block}.screen{min-height:var(--min-height,100dvh);grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);display:grid}.story{background:var(--jl-bg);color:var(--jl-text);flex-direction:column;justify-content:space-between;gap:32px;padding:40px 48px;display:flex;position:relative;overflow:hidden}.brand,.pitch,.points,.origin{z-index:1;position:relative}.pitch{gap:16px;max-width:520px;display:grid}.headline{letter-spacing:-.03em;text-wrap:balance;font-size:clamp(30px,3.4vw,46px);font-weight:800;line-height:1.08}.accent{color:var(--jl-brand)}.text{color:var(--jl-muted);font-size:15.5px;line-height:1.6}.points{font-size:var(--jl-font-md);gap:10px;margin:0;padding:0;list-style:none;display:grid}.points li{align-items:center;gap:10px;display:flex}.tick{background:var(--jl-brand);width:18px;height:18px;color:var(--jl-on-brand);border-radius:50%;flex:none;justify-content:center;align-items:center;display:inline-flex}.origin{color:var(--jl-muted);font-size:var(--jl-font-xs);letter-spacing:.08em;text-transform:uppercase;font-weight:650}.backdrop{opacity:.07;pointer-events:none;width:420px;height:460px;position:absolute;bottom:-110px;right:-90px}.side{background:var(--jl-bg);place-items:center;padding:32px 24px;display:grid}@media (width<=860px){.screen{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.story{padding:18px 24px}.pitch,.points,.origin,.backdrop{display:none}}";
3
+ export { jl_auth_layout_default as default };
@@ -22,12 +22,13 @@ export declare class JlAuthLayout extends JlElement {
22
22
  get(): string[];
23
23
  set(setter: string[] | ((prevState: string[]) => string[])): void;
24
24
  }>>;
25
- /** Where the app comes from, at the foot of the panel. */
25
+ /** Where the app comes from, at the foot of the panel: jlib's own text when not set, nothing when empty. */
26
26
  readonly origin: Readonly<Readonly<{
27
- get(): string;
28
- set(setter: string | ((prevState: string) => string)): void;
27
+ get(): string | null;
28
+ set(setter: string | ((prevState: string | null) => string | null) | null): void;
29
29
  }>>;
30
30
  private readonly _refs;
31
+ protected drawTexts(): void;
31
32
  templateHtml(): Node;
32
33
  templateCss(): string;
33
34
  private renderPitch;
@@ -1,16 +1,16 @@
1
+ import { starredParts } from "../lib/text.js";
2
+ import { jlText } from "../lib/texts.js";
1
3
  import { BASE_STYLES, TOKEN_STYLES } from "../styles/shared.js";
2
4
  import { JlElement } from "../base/jl-element.js";
3
5
  import { jsonOf } from "../lib/attributes.js";
4
6
  import { registerIcons } from "../lib/icons.js";
5
- import { starredParts } from "../lib/text.js";
6
7
  import { JlIcon } from "../atoms/jl-icon.js";
7
- import jl_auth_layout_default from "./jl-auth-layout.css_raw.js";
8
+ import jl_auth_layout_default from "./jl-auth-layout.css.js";
8
9
  import { css } from "@jadis/core";
9
10
  import { Check } from "lucide";
10
11
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
11
12
  // src/templates/jl-auth-layout.tsx
12
13
  registerIcons({ check: Check });
13
- var DEFAULT_ORIGIN = "Made in Switzerland by SyWare";
14
14
  var POINT_ICON_SIZE = 12;
15
15
  var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
16
16
  var MARK_VIEW_BOX = "429 1092 2155 2358";
@@ -62,17 +62,22 @@ var JlAuthLayout = class extends JlElement {
62
62
  attribute: "points",
63
63
  parse: jsonOf([])
64
64
  });
65
- /** Where the app comes from, at the foot of the panel. */
66
- origin = this.useChange(DEFAULT_ORIGIN, (value) => {
67
- this._refs.origin.textContent = value;
68
- this._refs.origin.hidden = value === "";
69
- }, { attribute: "origin" });
65
+ /** Where the app comes from, at the foot of the panel: jlib's own text when not set, nothing when empty. */
66
+ origin = this.useChange(null, () => this.drawTexts(), {
67
+ attribute: "origin",
68
+ parse: (value) => value
69
+ });
70
70
  _refs = this.useRefs((ref) => ({
71
71
  headline: ref(".headline"),
72
72
  origin: ref(".origin"),
73
73
  points: ref(".points"),
74
74
  text: ref(".text")
75
75
  }));
76
+ drawTexts() {
77
+ const origin = this.origin.get() ?? jlText("authOrigin");
78
+ this._refs.origin.textContent = origin;
79
+ this._refs.origin.hidden = origin === "";
80
+ }
76
81
  templateHtml() {
77
82
  return /* @__PURE__ */ jsxs("div", {
78
83
  class: "screen",
@@ -100,10 +105,7 @@ var JlAuthLayout = class extends JlElement {
100
105
  class: "points",
101
106
  hidden: true
102
107
  }),
103
- /* @__PURE__ */ jsx("p", {
104
- class: "origin",
105
- children: DEFAULT_ORIGIN
106
- }),
108
+ /* @__PURE__ */ jsx("p", { class: "origin" }),
107
109
  backdrop()
108
110
  ]
109
111
  }), /* @__PURE__ */ jsx("main", {
@@ -0,0 +1,3 @@
1
+ // src/templates/jl-page.css?inline
2
+ var jl_page_default = ":host{--page-width:var(--jl-page-standard);display:block}:host([width=form]){--page-width:var(--jl-page-form)}:host([width=wide]){--page-width:var(--jl-page-wide)}:host([width=full]){--page-width:none}.page{gap:var(--jl-space-6);max-width:var(--page-width);padding:var(--jl-space-8) var(--jl-space-10) var(--jl-space-12);grid-template-columns:minmax(0,1fr);margin:0 auto;display:grid}::slotted(*){min-width:0}.back{margin-left:-8px}@media (width<=720px){.page{padding:var(--jl-space-6) var(--jl-space-4) var(--jl-space-12)}}";
3
+ export { jl_page_default as default };