@aquera/nile-elements 2.0.5 → 2.0.7

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 (237) hide show
  1. package/README.md +7 -0
  2. package/demo/nxtgen-classes.css +15 -12
  3. package/demo/nxtgen-dark.css +24 -24
  4. package/demo/nxtgen-properties.css +27 -24
  5. package/demo/nxtgen-utilities.css +39 -36
  6. package/demo/nxtgen.css +15 -12
  7. package/demo/utilities.css +3 -0
  8. package/demo/variables.css +3 -0
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.js +1363 -340
  12. package/dist/internal/glyph.cjs.js +1 -1
  13. package/dist/internal/glyph.cjs.js.map +1 -1
  14. package/dist/internal/glyph.esm.js +6 -5
  15. package/dist/nile-app-shell/index.cjs.js +2 -0
  16. package/dist/nile-app-shell/index.cjs.js.map +1 -0
  17. package/dist/nile-app-shell/index.esm.js +1 -0
  18. package/dist/nile-app-shell/nile-app-shell.cjs.js +2 -0
  19. package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -0
  20. package/dist/nile-app-shell/nile-app-shell.css.cjs.js +2 -0
  21. package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -0
  22. package/dist/nile-app-shell/nile-app-shell.css.esm.js +554 -0
  23. package/dist/nile-app-shell/nile-app-shell.esm.js +155 -0
  24. package/dist/nile-app-shell/shell-controller.cjs.js +2 -0
  25. package/dist/nile-app-shell/shell-controller.cjs.js.map +1 -0
  26. package/dist/nile-app-shell/shell-controller.esm.js +1 -0
  27. package/dist/nile-app-shell-main/index.cjs.js +2 -0
  28. package/dist/nile-app-shell-main/index.cjs.js.map +1 -0
  29. package/dist/nile-app-shell-main/index.esm.js +1 -0
  30. package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js +2 -0
  31. package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js.map +1 -0
  32. package/dist/nile-app-shell-main/nile-app-shell-main.css.cjs.js +2 -0
  33. package/dist/nile-app-shell-main/nile-app-shell-main.css.cjs.js.map +1 -0
  34. package/dist/nile-app-shell-main/nile-app-shell-main.css.esm.js +18 -0
  35. package/dist/nile-app-shell-main/nile-app-shell-main.esm.js +1 -0
  36. package/dist/nile-app-shell-nav-toggle/index.cjs.js +2 -0
  37. package/dist/nile-app-shell-nav-toggle/index.cjs.js.map +1 -0
  38. package/dist/nile-app-shell-nav-toggle/index.esm.js +1 -0
  39. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +2 -0
  40. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -0
  41. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js +2 -0
  42. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js.map +1 -0
  43. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.esm.js +29 -0
  44. package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +16 -0
  45. package/dist/nile-app-shell-panel/index.cjs.js +2 -0
  46. package/dist/nile-app-shell-panel/index.cjs.js.map +1 -0
  47. package/dist/nile-app-shell-panel/index.esm.js +1 -0
  48. package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js +2 -0
  49. package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js.map +1 -0
  50. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +2 -0
  51. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -0
  52. package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +103 -0
  53. package/dist/nile-app-shell-panel/nile-app-shell-panel.esm.js +33 -0
  54. package/dist/nile-app-shell-side-nav/index.cjs.js +2 -0
  55. package/dist/nile-app-shell-side-nav/index.cjs.js.map +1 -0
  56. package/dist/nile-app-shell-side-nav/index.esm.js +1 -0
  57. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js +2 -0
  58. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -0
  59. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js +2 -0
  60. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -0
  61. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.esm.js +55 -0
  62. package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.esm.js +5 -0
  63. package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
  64. package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
  65. package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js +1 -1
  66. package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js.map +1 -1
  67. package/dist/nile-floating-panel/nile-floating-panel.css.esm.js +46 -8
  68. package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
  69. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  70. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  71. package/dist/nile-popover/nile-popover.css.cjs.js +1 -1
  72. package/dist/nile-popover/nile-popover.css.cjs.js.map +1 -1
  73. package/dist/nile-popover/nile-popover.css.esm.js +32 -17
  74. package/dist/nile-popover/nile-popover.esm.js +1 -1
  75. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js +1 -1
  76. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
  77. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  78. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  79. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +5 -0
  80. package/dist/nile-side-bar-footer/nile-side-bar-footer.esm.js +2 -2
  81. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js +1 -1
  82. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
  83. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
  84. package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
  85. package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +5 -0
  86. package/dist/nile-side-bar-header/nile-side-bar-header.esm.js +2 -2
  87. package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
  88. package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
  89. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
  90. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
  91. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +1 -1
  92. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -1
  93. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +1 -1
  94. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +1 -1
  95. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +1 -1
  96. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -1
  97. package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +1 -1
  98. package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +1 -1
  99. package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -1
  100. package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +2 -2
  101. package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +1 -1
  102. package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -1
  103. package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +4 -4
  104. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +1 -1
  105. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -1
  106. package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +1 -1
  107. package/dist/src/index.d.ts +7 -2
  108. package/dist/src/index.js +6 -1
  109. package/dist/src/index.js.map +1 -1
  110. package/dist/src/internal/glyph.d.ts +6 -1
  111. package/dist/src/internal/glyph.js +8 -1
  112. package/dist/src/internal/glyph.js.map +1 -1
  113. package/dist/src/nile-app-shell/index.d.ts +7 -0
  114. package/dist/src/nile-app-shell/index.js +8 -0
  115. package/dist/src/nile-app-shell/index.js.map +1 -0
  116. package/dist/src/nile-app-shell/nile-app-shell-regions.test.d.ts +4 -0
  117. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +177 -0
  118. package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -0
  119. package/dist/src/nile-app-shell/nile-app-shell.css.d.ts +18 -0
  120. package/dist/src/nile-app-shell/nile-app-shell.css.js +572 -0
  121. package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -0
  122. package/dist/src/nile-app-shell/nile-app-shell.d.ts +292 -0
  123. package/dist/src/nile-app-shell/nile-app-shell.js +796 -0
  124. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -0
  125. package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +3 -0
  126. package/dist/src/nile-app-shell/nile-app-shell.test.js +454 -0
  127. package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -0
  128. package/dist/src/nile-app-shell/shell-controller.d.ts +34 -0
  129. package/dist/src/nile-app-shell/shell-controller.js +80 -0
  130. package/dist/src/nile-app-shell/shell-controller.js.map +1 -0
  131. package/dist/src/nile-app-shell-main/index.d.ts +7 -0
  132. package/dist/src/nile-app-shell-main/index.js +8 -0
  133. package/dist/src/nile-app-shell-main/index.js.map +1 -0
  134. package/dist/src/nile-app-shell-main/nile-app-shell-main.css.d.ts +9 -0
  135. package/dist/src/nile-app-shell-main/nile-app-shell-main.css.js +27 -0
  136. package/dist/src/nile-app-shell-main/nile-app-shell-main.css.js.map +1 -0
  137. package/dist/src/nile-app-shell-main/nile-app-shell-main.d.ts +38 -0
  138. package/dist/src/nile-app-shell-main/nile-app-shell-main.js +51 -0
  139. package/dist/src/nile-app-shell-main/nile-app-shell-main.js.map +1 -0
  140. package/dist/src/nile-app-shell-nav-toggle/index.d.ts +7 -0
  141. package/dist/src/nile-app-shell-nav-toggle/index.js +8 -0
  142. package/dist/src/nile-app-shell-nav-toggle/index.js.map +1 -0
  143. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.d.ts +13 -0
  144. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js +42 -0
  145. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js.map +1 -0
  146. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.d.ts +56 -0
  147. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +126 -0
  148. package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -0
  149. package/dist/src/nile-app-shell-panel/index.d.ts +7 -0
  150. package/dist/src/nile-app-shell-panel/index.js +8 -0
  151. package/dist/src/nile-app-shell-panel/index.js.map +1 -0
  152. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.d.ts +9 -0
  153. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +112 -0
  154. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -0
  155. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.d.ts +73 -0
  156. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js +158 -0
  157. package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js.map +1 -0
  158. package/dist/src/nile-app-shell-side-nav/index.d.ts +7 -0
  159. package/dist/src/nile-app-shell-side-nav/index.js +8 -0
  160. package/dist/src/nile-app-shell-side-nav/index.js.map +1 -0
  161. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.d.ts +13 -0
  162. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +68 -0
  163. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -0
  164. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +54 -0
  165. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +83 -0
  166. package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -0
  167. package/dist/src/nile-floating-panel/nile-floating-panel.css.js +46 -8
  168. package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -1
  169. package/dist/src/nile-floating-panel/nile-floating-panel.js +13 -1
  170. package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
  171. package/dist/src/nile-popover/nile-popover.css.js +30 -15
  172. package/dist/src/nile-popover/nile-popover.css.js.map +1 -1
  173. package/dist/src/nile-popover/nile-popover.js +1 -1
  174. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  175. package/dist/src/nile-popover/nile-popover.test.js +1 -1
  176. package/dist/src/nile-popover/nile-popover.test.js.map +1 -1
  177. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +5 -0
  178. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  179. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +10 -0
  180. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +17 -1
  181. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +1 -1
  182. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.d.ts +1 -0
  183. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.js +42 -0
  184. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.js.map +1 -0
  185. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.d.ts +4 -0
  186. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js +68 -0
  187. package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js.map +1 -0
  188. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +5 -0
  189. package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
  190. package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +9 -0
  191. package/dist/src/nile-side-bar-header/nile-side-bar-header.js +17 -1
  192. package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +1 -1
  193. package/dist/src/nile-side-bar-header/nile-side-bar-header.test.d.ts +1 -0
  194. package/dist/src/nile-side-bar-header/nile-side-bar-header.test.js +42 -0
  195. package/dist/src/nile-side-bar-header/nile-side-bar-header.test.js.map +1 -0
  196. package/dist/src/version.d.ts +11 -1
  197. package/dist/src/version.js +51 -8
  198. package/dist/src/version.js.map +1 -1
  199. package/dist/tsconfig.tsbuildinfo +1 -1
  200. package/dist/version.cjs.js +1 -1
  201. package/dist/version.cjs.js.map +1 -1
  202. package/dist/version.esm.js +1 -1
  203. package/package.json +7 -2
  204. package/src/index.ts +16 -4
  205. package/src/internal/glyph.ts +12 -1
  206. package/src/nile-app-shell/index.ts +8 -0
  207. package/src/nile-app-shell/nile-app-shell-regions.test.ts +215 -0
  208. package/src/nile-app-shell/nile-app-shell.css.ts +574 -0
  209. package/src/nile-app-shell/nile-app-shell.test.ts +536 -0
  210. package/src/nile-app-shell/nile-app-shell.ts +838 -0
  211. package/src/nile-app-shell/shell-controller.ts +100 -0
  212. package/src/nile-app-shell-main/index.ts +8 -0
  213. package/src/nile-app-shell-main/nile-app-shell-main.css.ts +29 -0
  214. package/src/nile-app-shell-main/nile-app-shell-main.ts +52 -0
  215. package/src/nile-app-shell-nav-toggle/index.ts +8 -0
  216. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.ts +44 -0
  217. package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +138 -0
  218. package/src/nile-app-shell-panel/index.ts +8 -0
  219. package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +114 -0
  220. package/src/nile-app-shell-panel/nile-app-shell-panel.ts +161 -0
  221. package/src/nile-app-shell-side-nav/index.ts +8 -0
  222. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +70 -0
  223. package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +86 -0
  224. package/src/nile-floating-panel/nile-floating-panel.css.ts +46 -8
  225. package/src/nile-floating-panel/nile-floating-panel.ts +19 -1
  226. package/src/nile-popover/nile-popover.css.ts +30 -15
  227. package/src/nile-popover/nile-popover.test.ts +1 -1
  228. package/src/nile-popover/nile-popover.ts +1 -1
  229. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +5 -0
  230. package/src/nile-side-bar-footer/nile-side-bar-footer.test.ts +55 -0
  231. package/src/nile-side-bar-footer/nile-side-bar-footer.ts +12 -1
  232. package/src/nile-side-bar-header/nile-side-bar-app-shell.test.ts +78 -0
  233. package/src/nile-side-bar-header/nile-side-bar-header.css.ts +5 -0
  234. package/src/nile-side-bar-header/nile-side-bar-header.test.ts +55 -0
  235. package/src/nile-side-bar-header/nile-side-bar-header.ts +10 -0
  236. package/src/version.ts +55 -7
  237. package/vscode-html-custom-data.json +246 -9
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { __decorate } from "tslib";
8
8
  import { html } from 'lit';
9
- import { customElement } from 'lit/decorators.js';
9
+ import { customElement, property } from 'lit/decorators.js';
10
10
  import { styles } from './nile-side-bar-header.css';
11
11
  import NileElement from '../internal/nile-element';
12
12
  /**
@@ -14,8 +14,21 @@ import NileElement from '../internal/nile-element';
14
14
  *
15
15
  * @tag nile-side-bar-header
16
16
  *
17
+ * @attr background - Background treatment of the header ("default" | "transparent").
18
+ * Defaults to "default", which paints the sidebar surface color. Set to
19
+ * "transparent" to drop the background so whatever sits behind the header shows
20
+ * through.
17
21
  */
18
22
  let NileSideBarHeader = class NileSideBarHeader extends NileElement {
23
+ constructor() {
24
+ super(...arguments);
25
+ /**
26
+ * Background treatment of the header. `default` keeps the sidebar surface
27
+ * color; `transparent` removes it.
28
+ */
29
+ this.background = 'default';
30
+ /* #endregion */
31
+ }
19
32
  /**
20
33
  * The styles for nile-side-bar-header
21
34
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
@@ -38,6 +51,9 @@ let NileSideBarHeader = class NileSideBarHeader extends NileElement {
38
51
  `;
39
52
  }
40
53
  };
54
+ __decorate([
55
+ property({ type: String, reflect: true, attribute: true })
56
+ ], NileSideBarHeader.prototype, "background", void 0);
41
57
  NileSideBarHeader = __decorate([
42
58
  customElement('nile-side-bar-header')
43
59
  ], NileSideBarHeader);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar-header.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-header.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AAClD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAEjD;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACZ,OAAO,IAAI,CAAA;;;;;IAKT,CAAC;IACJ,CAAC;CAGD,CAAA;AA5BY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CA4B7B;;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property} from 'lit/decorators.js';\nimport {styles} from './nile-side-bar-header.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile side-bar-header component.\n *\n * @tag nile-side-bar-header\n *\n */\n@customElement('nile-side-bar-header')\nexport class NileSideBarHeader extends NileElement {\n\n\t/**\n\t * The styles for nile-side-bar-header\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t <div class=\"header-content\" part=\"header-content\">\n <slot name=\"logo\" part=\"logo\"></slot>\n <slot name=\"expand\" part=\"expand\"></slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileSideBarHeader;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar-header': NileSideBarHeader;\n }\n}"]}
1
+ {"version":3,"file":"nile-side-bar-header.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-header.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AAClD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;GASG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;;QAEN;;;WAGG;QACyD,eAAU,GAA8B,SAAS,CAAC;QA2B9G,gBAAgB;IACjB,CAAC;IA1BA;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACZ,OAAO,IAAI,CAAA;;;;;IAKT,CAAC;IACJ,CAAC;CAGD,CAAA;AA5B4D;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qDAAmD;AANlG,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAkC7B;;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property} from 'lit/decorators.js';\nimport {styles} from './nile-side-bar-header.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile side-bar-header component.\n *\n * @tag nile-side-bar-header\n *\n * @attr background - Background treatment of the header (\"default\" | \"transparent\").\n * Defaults to \"default\", which paints the sidebar surface color. Set to\n * \"transparent\" to drop the background so whatever sits behind the header shows\n * through.\n */\n@customElement('nile-side-bar-header')\nexport class NileSideBarHeader extends NileElement {\n\n\t/**\n\t * Background treatment of the header. `default` keeps the sidebar surface\n\t * color; `transparent` removes it.\n\t */\n\t@property({ type: String, reflect: true, attribute: true }) background: 'default' | 'transparent' = 'default';\n\n\t/**\n\t * The styles for nile-side-bar-header\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t <div class=\"header-content\" part=\"header-content\">\n <slot name=\"logo\" part=\"logo\"></slot>\n <slot name=\"expand\" part=\"expand\"></slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileSideBarHeader;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar-header': NileSideBarHeader;\n }\n}"]}
@@ -0,0 +1 @@
1
+ import './nile-side-bar-header';
@@ -0,0 +1,42 @@
1
+ import { expect, fixture, html } from '@open-wc/testing';
2
+ import './nile-side-bar-header';
3
+ const TRANSPARENT = 'rgba(0, 0, 0, 0)';
4
+ /**
5
+ * The surface color comes from a design token, which a bare fixture does not
6
+ * load — so pin it on a wrapper to have something concrete to assert against.
7
+ */
8
+ async function withToken(markup) {
9
+ const wrapper = await fixture(html `<div style="--nile-colors-neutral-100: rgb(1, 2, 3)">${markup}</div>`);
10
+ const el = wrapper.querySelector('nile-side-bar-header');
11
+ await el.updateComplete;
12
+ return el;
13
+ }
14
+ const backgroundOf = (el) => getComputedStyle(el).backgroundColor;
15
+ describe('NileSideBarHeader — background', () => {
16
+ it('1. defaults to "default" and reflects the attribute', async () => {
17
+ const el = await withToken(html `<nile-side-bar-header></nile-side-bar-header>`);
18
+ expect(el.background).to.equal('default');
19
+ expect(el.getAttribute('background')).to.equal('default');
20
+ });
21
+ it('2. paints the sidebar surface color by default', async () => {
22
+ const el = await withToken(html `<nile-side-bar-header></nile-side-bar-header>`);
23
+ expect(backgroundOf(el)).to.equal('rgb(1, 2, 3)');
24
+ });
25
+ it('3. background="transparent" removes the background', async () => {
26
+ const el = await withToken(html `<nile-side-bar-header background="transparent"></nile-side-bar-header>`);
27
+ expect(el.background).to.equal('transparent');
28
+ expect(backgroundOf(el)).to.equal(TRANSPARENT);
29
+ });
30
+ it('4. setting the property at runtime reflects and re-styles both ways', async () => {
31
+ const el = await withToken(html `<nile-side-bar-header></nile-side-bar-header>`);
32
+ el.background = 'transparent';
33
+ await el.updateComplete;
34
+ expect(el.getAttribute('background')).to.equal('transparent');
35
+ expect(backgroundOf(el)).to.equal(TRANSPARENT);
36
+ el.background = 'default';
37
+ await el.updateComplete;
38
+ expect(el.getAttribute('background')).to.equal('default');
39
+ expect(backgroundOf(el)).to.equal('rgb(1, 2, 3)');
40
+ });
41
+ });
42
+ //# sourceMappingURL=nile-side-bar-header.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-side-bar-header.test.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-header.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,wBAAwB,CAAC;AAGhC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAEvC;;;GAGG;AACH,KAAK,UAAU,SAAS,CAAC,MAAe;IACtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAC3B,IAAI,CAAA,wDAAwD,MAAM,QAAQ,CAC3E,CAAC;IACF,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAsB,CAAC;IAC9E,MAAM,EAAE,CAAC,cAAc,CAAC;IACxB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,YAAY,GAAG,CAAC,EAAqB,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC;AAErF,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,CAAA,+CAA+C,CAAC,CAAC;QAChF,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,CAAA,+CAA+C,CAAC,CAAC;QAChF,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;QAClE,MAAM,EAAE,GAAG,MAAM,SAAS,CACxB,IAAI,CAAA,wEAAwE,CAC7E,CAAC;QACF,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC9C,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qEAAqE,EAAE,KAAK,IAAI,EAAE;QACnF,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,CAAA,+CAA+C,CAAC,CAAC;QAEhF,EAAE,CAAC,UAAU,GAAG,aAAa,CAAC;QAC9B,MAAM,EAAE,CAAC,cAAc,CAAC;QACxB,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC9D,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAE/C,EAAE,CAAC,UAAU,GAAG,SAAS,CAAC;QAC1B,MAAM,EAAE,CAAC,cAAc,CAAC;QACxB,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC1D,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture, html } from '@open-wc/testing';\nimport './nile-side-bar-header';\nimport type { NileSideBarHeader } from './nile-side-bar-header';\n\nconst TRANSPARENT = 'rgba(0, 0, 0, 0)';\n\n/**\n * The surface color comes from a design token, which a bare fixture does not\n * load — so pin it on a wrapper to have something concrete to assert against.\n */\nasync function withToken(markup: unknown) {\n const wrapper = await fixture<HTMLDivElement>(\n html`<div style=\"--nile-colors-neutral-100: rgb(1, 2, 3)\">${markup}</div>`\n );\n const el = wrapper.querySelector('nile-side-bar-header') as NileSideBarHeader;\n await el.updateComplete;\n return el;\n}\n\nconst backgroundOf = (el: NileSideBarHeader) => getComputedStyle(el).backgroundColor;\n\ndescribe('NileSideBarHeader — background', () => {\n it('1. defaults to \"default\" and reflects the attribute', async () => {\n const el = await withToken(html`<nile-side-bar-header></nile-side-bar-header>`);\n expect(el.background).to.equal('default');\n expect(el.getAttribute('background')).to.equal('default');\n });\n\n it('2. paints the sidebar surface color by default', async () => {\n const el = await withToken(html`<nile-side-bar-header></nile-side-bar-header>`);\n expect(backgroundOf(el)).to.equal('rgb(1, 2, 3)');\n });\n\n it('3. background=\"transparent\" removes the background', async () => {\n const el = await withToken(\n html`<nile-side-bar-header background=\"transparent\"></nile-side-bar-header>`\n );\n expect(el.background).to.equal('transparent');\n expect(backgroundOf(el)).to.equal(TRANSPARENT);\n });\n\n it('4. setting the property at runtime reflects and re-styles both ways', async () => {\n const el = await withToken(html`<nile-side-bar-header></nile-side-bar-header>`);\n\n el.background = 'transparent';\n await el.updateComplete;\n expect(el.getAttribute('background')).to.equal('transparent');\n expect(backgroundOf(el)).to.equal(TRANSPARENT);\n\n el.background = 'default';\n await el.updateComplete;\n expect(el.getAttribute('background')).to.equal('default');\n expect(backgroundOf(el)).to.equal('rgb(1, 2, 3)');\n });\n});\n"]}
@@ -1,2 +1,12 @@
1
1
  export declare const NILE_ELEMENTS_VERSION = "__NILE_ELEMENTS_VERSION__";
2
- export declare const NILE_VERSION: string;
2
+ /**
3
+ * The version of @aquera/nile (tokens/stylesheets) whose CSS is loaded in the
4
+ * page, falling back to the @aquera/nile bundled into this package when no
5
+ * stamped stylesheet is present.
6
+ *
7
+ * This is the canonical runtime API. It resolves on every call rather than
8
+ * caching, so it is correct even when the Nile stylesheet is added to the page
9
+ * after this module evaluates - which is the common case, and why no
10
+ * module-evaluation-time snapshot of it is exported.
11
+ */
12
+ export declare function getNileVersion(): string;
@@ -3,16 +3,59 @@
3
3
  // NILE_ELEMENTS_VERSION is this package's own version and is still substituted
4
4
  // at build time by scripts/replace-version.cjs.
5
5
  //
6
- // NILE_VERSION is read from the installed @aquera/nile at runtime, so publishing
7
- // @aquera/nile on its own is enough to update window.nileVersion - consumers do
8
- // not need a rebuild of this package to pick up a new tokens version.
9
- import { NILE_VERSION as INSTALLED_NILE_VERSION } from '@aquera/nile/lib/version.js';
10
- export const NILE_ELEMENTS_VERSION = '2.0.5';
11
- export const NILE_VERSION = INSTALLED_NILE_VERSION;
6
+ // The tokens version is read from the loaded Nile stylesheet's --nile-version
7
+ // custom property (stamped by @aquera/nile's scripts/stamp-css-version.mjs),
8
+ // falling back to the @aquera/nile installed alongside this package.
9
+ //
10
+ // Reading the stylesheet is what makes a tokens-only release visible. The
11
+ // imported constant alone is not enough: rollup.config.js bundles
12
+ // @aquera/nile/lib/version.js into dist/index.js, so on the CDN build it is
13
+ // frozen at this package's build time. The stylesheet is the live source.
14
+ import { NILE_VERSION as BUILT_IN_NILE_VERSION } from '@aquera/nile/lib/version.js';
15
+ export const NILE_ELEMENTS_VERSION = '2.0.7';
16
+ function readStylesheetNileVersion() {
17
+ if (typeof window === 'undefined' || typeof getComputedStyle !== 'function') {
18
+ return null;
19
+ }
20
+ try {
21
+ const value = getComputedStyle(document.documentElement)
22
+ .getPropertyValue('--nile-version')
23
+ .trim()
24
+ .replace(/^["']|["']$/g, '');
25
+ return value || null;
26
+ }
27
+ catch {
28
+ return null;
29
+ }
30
+ }
31
+ /**
32
+ * The version of @aquera/nile (tokens/stylesheets) whose CSS is loaded in the
33
+ * page, falling back to the @aquera/nile bundled into this package when no
34
+ * stamped stylesheet is present.
35
+ *
36
+ * This is the canonical runtime API. It resolves on every call rather than
37
+ * caching, so it is correct even when the Nile stylesheet is added to the page
38
+ * after this module evaluates - which is the common case, and why no
39
+ * module-evaluation-time snapshot of it is exported.
40
+ */
41
+ export function getNileVersion() {
42
+ return readStylesheetNileVersion() ?? BUILT_IN_NILE_VERSION;
43
+ }
12
44
  // Set global versions for runtime access
13
45
  if (typeof window !== 'undefined') {
14
46
  window.nileElementsVersion = NILE_ELEMENTS_VERSION;
15
- window.nileVersion = NILE_VERSION;
16
- window.process = window.process || { env: { NODE_ENV: 'production' } };
47
+ // A getter rather than a value, so window.nileVersion reflects whichever
48
+ // stylesheet is loaded at read time regardless of script/style ordering.
49
+ let override = null;
50
+ Object.defineProperty(window, 'nileVersion', {
51
+ configurable: true,
52
+ get: () => override ?? getNileVersion(),
53
+ set: (value) => {
54
+ override = value;
55
+ },
56
+ });
57
+ window.process = window.process || {
58
+ env: { NODE_ENV: 'production' },
59
+ };
17
60
  }
18
61
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,EAAE;AACF,+EAA+E;AAC/E,gDAAgD;AAChD,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,sEAAsE;AACtE,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErF,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAEnD,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAC3D,MAAc,CAAC,WAAW,GAAG,YAAY,CAAC;IAC3C,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,CAAC;AACzE,CAAC","sourcesContent":["// Version utility.\n//\n// NILE_ELEMENTS_VERSION is this package's own version and is still substituted\n// at build time by scripts/replace-version.cjs.\n//\n// NILE_VERSION is read from the installed @aquera/nile at runtime, so publishing\n// @aquera/nile on its own is enough to update window.nileVersion - consumers do\n// not need a rebuild of this package to pick up a new tokens version.\nimport { NILE_VERSION as INSTALLED_NILE_VERSION } from '@aquera/nile/lib/version.js';\n\nexport const NILE_ELEMENTS_VERSION = '2.0.5';\nexport const NILE_VERSION = INSTALLED_NILE_VERSION;\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n (window as any).nileVersion = NILE_VERSION;\n window.process = window.process || { env: { NODE_ENV: 'production' } };\n}\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,EAAE;AACF,+EAA+E;AAC/E,gDAAgD;AAChD,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,0EAA0E;AAC1E,kEAAkE;AAClE,4EAA4E;AAC5E,0EAA0E;AAC1E,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEjE,SAAS,yBAAyB;IAChC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE,CAAC;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC;aACrD,gBAAgB,CAAC,gBAAgB,CAAC;aAClC,IAAI,EAAE;aACN,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAE/B,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,yBAAyB,EAAE,IAAI,qBAAqB,CAAC;AAC9D,CAAC;AAED,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAE5D,yEAAyE;IACzE,yEAAyE;IACzE,IAAI,QAAQ,GAAkB,IAAI,CAAC;IACnC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE;QAC3C,YAAY,EAAE,IAAI;QAClB,GAAG,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,cAAc,EAAE;QACvC,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE;YACrB,QAAQ,GAAG,KAAK,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEF,MAAc,CAAC,OAAO,GAAI,MAAc,CAAC,OAAO,IAAI;QACnD,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;KAChC,CAAC;AACJ,CAAC","sourcesContent":["// Version utility.\n//\n// NILE_ELEMENTS_VERSION is this package's own version and is still substituted\n// at build time by scripts/replace-version.cjs.\n//\n// The tokens version is read from the loaded Nile stylesheet's --nile-version\n// custom property (stamped by @aquera/nile's scripts/stamp-css-version.mjs),\n// falling back to the @aquera/nile installed alongside this package.\n//\n// Reading the stylesheet is what makes a tokens-only release visible. The\n// imported constant alone is not enough: rollup.config.js bundles\n// @aquera/nile/lib/version.js into dist/index.js, so on the CDN build it is\n// frozen at this package's build time. The stylesheet is the live source.\nimport { NILE_VERSION as BUILT_IN_NILE_VERSION } from '@aquera/nile/lib/version.js';\n\nexport const NILE_ELEMENTS_VERSION = '2.0.7';\n\nfunction readStylesheetNileVersion(): string | null {\n if (typeof window === 'undefined' || typeof getComputedStyle !== 'function') {\n return null;\n }\n\n try {\n const value = getComputedStyle(document.documentElement)\n .getPropertyValue('--nile-version')\n .trim()\n .replace(/^[\"']|[\"']$/g, '');\n\n return value || null;\n } catch {\n return null;\n }\n}\n\n/**\n * The version of @aquera/nile (tokens/stylesheets) whose CSS is loaded in the\n * page, falling back to the @aquera/nile bundled into this package when no\n * stamped stylesheet is present.\n *\n * This is the canonical runtime API. It resolves on every call rather than\n * caching, so it is correct even when the Nile stylesheet is added to the page\n * after this module evaluates - which is the common case, and why no\n * module-evaluation-time snapshot of it is exported.\n */\nexport function getNileVersion(): string {\n return readStylesheetNileVersion() ?? BUILT_IN_NILE_VERSION;\n}\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n\n // A getter rather than a value, so window.nileVersion reflects whichever\n // stylesheet is loaded at read time regardless of script/style ordering.\n let override: string | null = null;\n Object.defineProperty(window, 'nileVersion', {\n configurable: true,\n get: () => override ?? getNileVersion(),\n set: (value: string) => {\n override = value;\n },\n });\n\n (window as any).process = (window as any).process || {\n env: { NODE_ENV: 'production' },\n };\n}\n"]}