@design.estate/dees-catalog 21.49.0 → 21.49.1

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 (56) hide show
  1. package/dist_bundle/bundle.js +85 -132
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QG5BHDQO.js → chunk-2O2L36Y3.js} +91 -69
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QG5BHDQO.js.map → chunk-2O2L36Y3.js.map} +1 -1
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Q5VY4AV7.js → chunk-DTFC5CU3.js} +493 -34
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-DTFC5CU3.js.map +1 -0
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-YOGT7PSU.js → dees-modal-4DMZSC7L.js} +2 -2
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-ORLONA36.js → dees-workspace-terminal-DM23WG2C.js} +3 -3
  9. package/dist_ts_web/00_commitinfo_data.js +1 -1
  10. package/dist_ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.d.ts +2 -0
  11. package/dist_ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.js +5 -20
  12. package/dist_ts_web/elements/00group-appui/dees-appui-mainmenu/dees-appui-mainmenu.d.ts +2 -0
  13. package/dist_ts_web/elements/00group-appui/dees-appui-mainmenu/dees-appui-mainmenu.js +5 -18
  14. package/dist_ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.d.ts +2 -0
  15. package/dist_ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.js +5 -18
  16. package/dist_ts_web/elements/00group-appui/dees-appui-tabs/dees-appui-tabs.d.ts +2 -0
  17. package/dist_ts_web/elements/00group-appui/dees-appui-tabs/dees-appui-tabs.js +10 -33
  18. package/dist_ts_web/elements/00group-feedback/dees-progressbar/dees-progressbar.d.ts +2 -0
  19. package/dist_ts_web/elements/00group-feedback/dees-progressbar/dees-progressbar.js +6 -14
  20. package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +2 -0
  21. package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +14 -4
  22. package/dist_ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown-popup.d.ts +2 -0
  23. package/dist_ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown-popup.js +5 -18
  24. package/dist_ts_web/elements/00group-input/dees-input-tags/dees-input-tags.d.ts +2 -0
  25. package/dist_ts_web/elements/00group-input/dees-input-tags/dees-input-tags.js +14 -23
  26. package/dist_ts_web/elements/00group-input/dees-input-wysiwyg/blocks/text/code.block.js +7 -19
  27. package/dist_ts_web/elements/00group-input/dees-input-wysiwyg/wysiwyg.markdown.view.d.ts +3 -0
  28. package/dist_ts_web/elements/00group-input/dees-input-wysiwyg/wysiwyg.markdown.view.js +15 -1
  29. package/dist_ts_web/elements/00scrollbars.d.ts +122 -0
  30. package/dist_ts_web/elements/00scrollbars.js +545 -0
  31. package/dist_ts_web/elements/00scrolledges.d.ts +1 -14
  32. package/dist_ts_web/elements/00scrolledges.js +7 -70
  33. package/dist_ts_web/elements/00scrollerwatch.d.ts +31 -0
  34. package/dist_ts_web/elements/00scrollerwatch.js +88 -0
  35. package/dist_ts_web/elements/index.d.ts +1 -0
  36. package/dist_ts_web/elements/index.js +3 -1
  37. package/package.json +1 -1
  38. package/readme.md +45 -0
  39. package/ts_web/00_commitinfo_data.ts +1 -1
  40. package/ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.ts +8 -19
  41. package/ts_web/elements/00group-appui/dees-appui-mainmenu/dees-appui-mainmenu.ts +8 -17
  42. package/ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.ts +8 -17
  43. package/ts_web/elements/00group-appui/dees-appui-tabs/dees-appui-tabs.ts +13 -32
  44. package/ts_web/elements/00group-feedback/dees-progressbar/dees-progressbar.ts +9 -13
  45. package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +13 -3
  46. package/ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown-popup.ts +8 -17
  47. package/ts_web/elements/00group-input/dees-input-tags/dees-input-tags.ts +17 -22
  48. package/ts_web/elements/00group-input/dees-input-wysiwyg/blocks/text/code.block.ts +7 -18
  49. package/ts_web/elements/00group-input/dees-input-wysiwyg/wysiwyg.markdown.view.ts +14 -0
  50. package/ts_web/elements/00scrollbars.ts +613 -0
  51. package/ts_web/elements/00scrolledges.ts +6 -71
  52. package/ts_web/elements/00scrollerwatch.ts +89 -0
  53. package/ts_web/elements/index.ts +2 -0
  54. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-Q5VY4AV7.js.map +0 -1
  55. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-YOGT7PSU.js.map → dees-modal-4DMZSC7L.js.map} +0 -0
  56. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-ORLONA36.js.map → dees-workspace-terminal-DM23WG2C.js.map} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { css, html, type CSSResult, type DeesElement, type TemplateResult } from '@design.estate/dees-element';
2
2
  import type { TReactiveController } from './00controller.js';
3
+ import { ScrollerWatch } from './00scrollerwatch.js';
3
4
 
4
5
  /** Scroll offsets within this distance of an end are layout rounding, not content past the edge. */
5
6
  const edgeThresholdPx = 1;
@@ -158,13 +159,10 @@ export const scrollEdgeFadeStyles: CSSResult = css`
158
159
  * ```
159
160
  */
160
161
  export class ScrollEdgeShadowController implements TReactiveController {
161
- private scroller: HTMLElement | null = null;
162
162
  private connected = false;
163
163
  private topVisible = false;
164
164
  private bottomVisible = false;
165
- private resizeObserver: ResizeObserver | undefined;
166
- private mutationObserver: MutationObserver | undefined;
167
- private slots: HTMLSlotElement[] = [];
165
+ private readonly watch = new ScrollerWatch(() => this.sync(), () => this.sync());
168
166
 
169
167
  constructor(
170
168
  private readonly host: DeesElement,
@@ -188,7 +186,7 @@ export class ScrollEdgeShadowController implements TReactiveController {
188
186
  this.connected = true;
189
187
  void this.host.updateComplete.then(() => {
190
188
  if (this.connected) {
191
- this.follow();
189
+ this.watch.follow(this.scrollerArg() ?? null);
192
190
  this.sync();
193
191
  }
194
192
  });
@@ -197,14 +195,14 @@ export class ScrollEdgeShadowController implements TReactiveController {
197
195
  /** Every render may change the scroller, its content or where it is scrolled to. */
198
196
  public hostUpdated(): void {
199
197
  if (this.connected) {
200
- this.follow();
198
+ this.watch.follow(this.scrollerArg() ?? null);
201
199
  this.sync();
202
200
  }
203
201
  }
204
202
 
205
203
  public hostDisconnected(): void {
206
204
  this.connected = false;
207
- this.unfollow();
205
+ this.watch.unfollow();
208
206
  }
209
207
 
210
208
  /**
@@ -231,7 +229,7 @@ export class ScrollEdgeShadowController implements TReactiveController {
231
229
  * scrolls at the edge does, calls it to show the edges in the same frame.
232
230
  */
233
231
  public readonly sync = (): void => {
234
- const scroller = this.scroller;
232
+ const scroller = this.watch.scroller;
235
233
  const top = !!scroller && scroller.scrollTop > edgeThresholdPx;
236
234
  const bottom = !!scroller
237
235
  && scroller.scrollTop + scroller.clientHeight < scroller.scrollHeight - edgeThresholdPx;
@@ -242,67 +240,4 @@ export class ScrollEdgeShadowController implements TReactiveController {
242
240
  this.bottomVisible = bottom;
243
241
  this.host.requestUpdate();
244
242
  };
245
-
246
- /** Follows the scroller the host names now; the same scroller stays followed as it is. */
247
- private follow(): void {
248
- const scroller = this.scrollerArg() ?? null;
249
- if (scroller === this.scroller) {
250
- return;
251
- }
252
- this.unfollow();
253
- this.scroller = scroller;
254
- if (!scroller) {
255
- return;
256
- }
257
- scroller.addEventListener('scroll', this.sync, { passive: true });
258
- this.resizeObserver = new ResizeObserver(this.sync);
259
- this.mutationObserver = new MutationObserver(this.observeContent);
260
- this.mutationObserver.observe(scroller, { childList: true });
261
- this.observeContent();
262
- }
263
-
264
- /**
265
- * Observes the scroller and what fills it: the scroll height changes with the size of its
266
- * children, and with the elements assigned to a slot among them. Children that come or go are
267
- * observed anew, and their coming or going is measured at once, since a child that leaves
268
- * resizes nothing that stays.
269
- */
270
- private readonly observeContent = (): void => {
271
- const scroller = this.scroller;
272
- const resizeObserver = this.resizeObserver;
273
- if (!scroller || !resizeObserver) {
274
- return;
275
- }
276
- resizeObserver.disconnect();
277
- for (const slot of this.slots) {
278
- slot.removeEventListener('slotchange', this.observeContent);
279
- }
280
- this.slots = [];
281
- resizeObserver.observe(scroller);
282
- for (const child of scroller.children) {
283
- if (child instanceof HTMLSlotElement) {
284
- this.slots.push(child);
285
- child.addEventListener('slotchange', this.observeContent);
286
- for (const assigned of child.assignedElements({ flatten: true })) {
287
- resizeObserver.observe(assigned);
288
- }
289
- } else {
290
- resizeObserver.observe(child);
291
- }
292
- }
293
- this.sync();
294
- };
295
-
296
- private unfollow(): void {
297
- this.scroller?.removeEventListener('scroll', this.sync);
298
- this.resizeObserver?.disconnect();
299
- this.resizeObserver = undefined;
300
- this.mutationObserver?.disconnect();
301
- this.mutationObserver = undefined;
302
- for (const slot of this.slots) {
303
- slot.removeEventListener('slotchange', this.observeContent);
304
- }
305
- this.slots = [];
306
- this.scroller = null;
307
- }
308
243
  }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Follows one scroller for what a scroller's companions measure: it calls `onScroll` when the
3
+ * scroller scrolls and `onLayout` when the scroller or any of its element children resizes — a
4
+ * row added, a group folded, a pane dragged narrower — and when children come or go. A slot among
5
+ * the children stands for the elements assigned to it. Scroll edges and overlay scrollbars both
6
+ * follow their scroller through it.
7
+ */
8
+ export class ScrollerWatch {
9
+ private target: HTMLElement | null = null;
10
+ private resizeObserver: ResizeObserver | undefined;
11
+ private mutationObserver: MutationObserver | undefined;
12
+ private slots: HTMLSlotElement[] = [];
13
+
14
+ constructor(
15
+ private readonly onScroll: () => void,
16
+ private readonly onLayout: () => void,
17
+ ) {}
18
+
19
+ /** The scroller followed now, if any. */
20
+ public get scroller(): HTMLElement | null {
21
+ return this.target;
22
+ }
23
+
24
+ /**
25
+ * Follows `scroller`, or nothing; the same scroller stays followed as it is. Answers whether the
26
+ * followed scroller changed. A new one is measured at once, through `onLayout`.
27
+ */
28
+ public follow(scroller: HTMLElement | null): boolean {
29
+ if (scroller === this.target) {
30
+ return false;
31
+ }
32
+ this.unfollow();
33
+ this.target = scroller;
34
+ if (!scroller) {
35
+ return true;
36
+ }
37
+ scroller.addEventListener('scroll', this.onScroll, { passive: true });
38
+ this.resizeObserver = new ResizeObserver(() => this.onLayout());
39
+ this.mutationObserver = new MutationObserver(this.observeContent);
40
+ this.mutationObserver.observe(scroller, { childList: true });
41
+ this.observeContent();
42
+ return true;
43
+ }
44
+
45
+ public unfollow(): void {
46
+ this.target?.removeEventListener('scroll', this.onScroll);
47
+ this.resizeObserver?.disconnect();
48
+ this.resizeObserver = undefined;
49
+ this.mutationObserver?.disconnect();
50
+ this.mutationObserver = undefined;
51
+ for (const slot of this.slots) {
52
+ slot.removeEventListener('slotchange', this.observeContent);
53
+ }
54
+ this.slots = [];
55
+ this.target = null;
56
+ }
57
+
58
+ /**
59
+ * Observes the scroller and what fills it: the scroll height changes with the size of its
60
+ * children, and with the elements assigned to a slot among them. Children that come or go are
61
+ * observed anew, and their coming or going is measured at once, since a child that leaves
62
+ * resizes nothing that stays.
63
+ */
64
+ private readonly observeContent = (): void => {
65
+ const scroller = this.target;
66
+ const resizeObserver = this.resizeObserver;
67
+ if (!scroller || !resizeObserver) {
68
+ return;
69
+ }
70
+ resizeObserver.disconnect();
71
+ for (const slot of this.slots) {
72
+ slot.removeEventListener('slotchange', this.observeContent);
73
+ }
74
+ this.slots = [];
75
+ resizeObserver.observe(scroller);
76
+ for (const child of scroller.children) {
77
+ if (child instanceof HTMLSlotElement) {
78
+ this.slots.push(child);
79
+ child.addEventListener('slotchange', this.observeContent);
80
+ for (const assigned of child.assignedElements({ flatten: true })) {
81
+ resizeObserver.observe(assigned);
82
+ }
83
+ } else {
84
+ resizeObserver.observe(child);
85
+ }
86
+ }
87
+ this.onLayout();
88
+ };
89
+ }
@@ -3,6 +3,8 @@ export * from './00zindex.js';
3
3
  export * from './00theme.js';
4
4
  // Scroll edges: shadows where content scrolls beneath fixed chrome, fades where it scrolls in a surface of its own.
5
5
  export * from './00scrolledges.js';
6
+ // Overlay scrollbars: shown while a scroller scrolls or the pointer is over it, taking no room.
7
+ export * from './00scrollbars.js';
6
8
  // Text for assistive technology alone, out of sight.
7
9
  export * from './00visuallyhidden.js';
8
10
  // A tile's standard header and footer bar, for a header or footer a component slots into a tile.