@swiftwc/ui 0.0.0-dev.103 → 0.0.0-dev.106

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 (95) hide show
  1. package/generated/client/index.js +7 -8
  2. package/generated/components/alert-dialog.js +9 -17
  3. package/generated/components/body-view.js +3 -5
  4. package/generated/components/bordered-button.js +4 -7
  5. package/generated/components/bordered-prominent-button.js +4 -7
  6. package/generated/components/borderless-button.js +4 -7
  7. package/generated/components/color-scheme.js +4 -7
  8. package/generated/components/confirmation-dialog.js +9 -17
  9. package/generated/components/content-unavailable.js +4 -7
  10. package/generated/components/date-picker.js +13 -25
  11. package/generated/components/detail-placeholder.js +4 -8
  12. package/generated/components/disclosure-group.js +5 -9
  13. package/generated/components/fine-tooltip.js +4 -7
  14. package/generated/components/form-view.js +3 -5
  15. package/generated/components/glass-button.js +4 -7
  16. package/generated/components/glass-prominent-button.js +4 -7
  17. package/generated/components/h-divider.d.ts +11 -0
  18. package/generated/components/h-divider.js +15 -0
  19. package/generated/components/h-stack.js +3 -5
  20. package/generated/components/image-view.js +4 -7
  21. package/generated/components/index.d.ts +2 -0
  22. package/generated/components/index.js +2 -0
  23. package/generated/components/label-view.js +4 -7
  24. package/generated/components/labeled-content.js +4 -7
  25. package/generated/components/list-view.js +3 -5
  26. package/generated/components/menu-view.js +10 -19
  27. package/generated/components/navigation-large-title.js +5 -9
  28. package/generated/components/navigation-split-view.js +4 -7
  29. package/generated/components/navigation-stack.js +4 -7
  30. package/generated/components/navigation-title.js +4 -7
  31. package/generated/components/picker-view.js +32 -61
  32. package/generated/components/plain-button.js +3 -5
  33. package/generated/components/progress-view.js +6 -11
  34. package/generated/components/screen-view.js +2 -3
  35. package/generated/components/scroll-view-proxy.js +3 -5
  36. package/generated/components/scroll-view.js +9 -16
  37. package/generated/components/search-view.js +4 -7
  38. package/generated/components/section-view.js +4 -7
  39. package/generated/components/sheet-view.js +6 -11
  40. package/generated/components/sidebar-toggle.js +5 -9
  41. package/generated/components/sidebar-view.js +2 -3
  42. package/generated/components/sticky-container.js +3 -5
  43. package/generated/components/tab-bar.js +4 -7
  44. package/generated/components/tab-item.js +8 -15
  45. package/generated/components/tab-view.js +8 -14
  46. package/generated/components/table-view.js +6 -11
  47. package/generated/components/text-field.js +10 -19
  48. package/generated/components/text-view.js +4 -7
  49. package/generated/components/toggle-view.js +13 -25
  50. package/generated/components/tool-bar-item-group.js +3 -5
  51. package/generated/components/tool-bar-item.js +4 -7
  52. package/generated/components/tool-bar.js +4 -7
  53. package/generated/components/v-divider.d.ts +11 -0
  54. package/generated/components/v-divider.js +15 -0
  55. package/generated/components/v-keyboard.js +8 -12
  56. package/generated/components/v-stack.js +3 -5
  57. package/generated/css/index.css +13 -5
  58. package/generated/internal/class/css-style-observer.js +2 -3
  59. package/generated/internal/class/form-associated-base.js +5 -7
  60. package/generated/internal/class/navigation-view.js +3 -5
  61. package/generated/internal/decorators/adaptive-slot.js +4 -7
  62. package/generated/internal/decorators/microtask-on-connected.d.ts +2 -2
  63. package/generated/internal/decorators/microtask-on-connected.js +2 -2
  64. package/generated/internal/flags.json +3 -0
  65. package/generated/internal/privateNamespace.js +12 -21
  66. package/generated/internal/utils/$.d.ts +9 -0
  67. package/generated/internal/utils/$.js +11 -0
  68. package/generated/internal/utils/debug.d.ts +1 -0
  69. package/generated/internal/utils/debug.js +4 -0
  70. package/generated/internal/utils/index.d.ts +36 -2
  71. package/generated/internal/utils/index.js +36 -5
  72. package/generated/internal/utils/is-inside.js +1 -1
  73. package/generated/snapshot/index.js +3 -5
  74. package/package.json +11 -7
  75. package/scss/components/_index.scss +3 -1
  76. package/scss/components/_picker-view.scss +1 -1
  77. package/web-components.html-data/en.json +8 -0
  78. package/generated/internal/utils/cash/index.d.ts +0 -24
  79. package/generated/internal/utils/cash/index.js +0 -27
  80. package/generated/internal/utils/dev-flags.d.ts +0 -3
  81. package/generated/internal/utils/dev-flags.js +0 -5
  82. /package/generated/internal/utils/{cash/ancestors.d.ts → ancestors.d.ts} +0 -0
  83. /package/generated/internal/utils/{cash/ancestors.js → ancestors.js} +0 -0
  84. /package/generated/internal/utils/{cash/next-all.d.ts → next-all.d.ts} +0 -0
  85. /package/generated/internal/utils/{cash/next-all.js → next-all.js} +0 -0
  86. /package/generated/internal/utils/{cash/next.d.ts → next.d.ts} +0 -0
  87. /package/generated/internal/utils/{cash/next.js → next.js} +0 -0
  88. /package/generated/internal/utils/{cash/prev-all.d.ts → prev-all.d.ts} +0 -0
  89. /package/generated/internal/utils/{cash/prev-all.js → prev-all.js} +0 -0
  90. /package/generated/internal/utils/{cash/prev.d.ts → prev.d.ts} +0 -0
  91. /package/generated/internal/utils/{cash/prev.js → prev.js} +0 -0
  92. /package/generated/internal/utils/{cash/prop.d.ts → prop.d.ts} +0 -0
  93. /package/generated/internal/utils/{cash/prop.js → prop.js} +0 -0
  94. /package/generated/internal/utils/{cash/siblings.d.ts → siblings.d.ts} +0 -0
  95. /package/generated/internal/utils/{cash/siblings.js → siblings.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
- import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
2
+ import { debug, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
@@ -25,19 +25,16 @@ export class GlassButton extends ButtonBase {
25
25
  super();
26
26
  }
27
27
  static polyfillDisconnectedCallback(el) {
28
- if (devFlags.debug)
29
- console.debug(`${GlassButton.name} ⚡️ disconnect`);
28
+ debug(`${GlassButton.name} ⚡️ disconnect`);
30
29
  CleanupRegistry.unregister(el);
31
30
  }
32
31
  static polyfillConnectedCallback(el) {
33
- if (devFlags.debug)
34
- console.debug(`${GlassButton.name} ⚡️ connect`);
32
+ debug(`${GlassButton.name} ⚡️ connect`);
35
33
  CleanupRegistry.register(el, onoff(touchGlass(el, (t) => t, () => true), el).on());
36
34
  el.tabIndex = 0;
37
35
  }
38
36
  static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]) {
39
- if (devFlags.debug)
40
- console.debug(`${GlassButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
37
+ debug(`${GlassButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
41
38
  const node = target instanceof HTMLButtonElement;
42
39
  if (!node)
43
40
  return;
@@ -1,5 +1,5 @@
1
1
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
- import { devFlags, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
2
+ import { debug, ensurePlaceholder, onoff, touchGlass } from '../internal/utils';
3
3
  import { ButtonBase } from '../namespace-browser/base';
4
4
  import { Snapshot } from '../snapshot';
5
5
  /**
@@ -25,19 +25,16 @@ export class GlassProminentButton extends ButtonBase {
25
25
  super();
26
26
  }
27
27
  static polyfillDisconnectedCallback(el) {
28
- if (devFlags.debug)
29
- console.debug(`${GlassProminentButton.name} ⚡️ disconnect`);
28
+ debug(`${GlassProminentButton.name} ⚡️ disconnect`);
30
29
  CleanupRegistry.unregister(el);
31
30
  }
32
31
  static polyfillConnectedCallback(el) {
33
- if (devFlags.debug)
34
- console.debug(`${GlassProminentButton.name} ⚡️ connect`);
32
+ debug(`${GlassProminentButton.name} ⚡️ connect`);
35
33
  CleanupRegistry.register(el, onoff(touchGlass(el, (t) => t, () => true), el).on());
36
34
  el.tabIndex = 0;
37
35
  }
38
36
  static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]) {
39
- if (devFlags.debug)
40
- console.debug(`${GlassProminentButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
37
+ debug(`${GlassProminentButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
41
38
  const node = target instanceof HTMLButtonElement;
42
39
  if (!node)
43
40
  return;
@@ -0,0 +1,11 @@
1
+ export declare class HDivider extends HTMLElement {
2
+ constructor();
3
+ connectedCallback(): void;
4
+ disconnectedCallback(): void;
5
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'h-divider': HDivider;
10
+ }
11
+ }
@@ -0,0 +1,15 @@
1
+ import { debug } from '../internal/utils';
2
+ export class HDivider extends HTMLElement {
3
+ constructor() {
4
+ super();
5
+ }
6
+ connectedCallback() {
7
+ debug(`${HDivider.name} ⚡️ connect`);
8
+ }
9
+ disconnectedCallback() {
10
+ debug(`${HDivider.name} ⚡️ disconnect`);
11
+ }
12
+ attributeChangedCallback(name, oldValue, newValue) {
13
+ debug(`${HDivider.name} ⚡️ attr-change [${name}]`);
14
+ }
15
+ }
@@ -1,4 +1,4 @@
1
- import { devFlags } from '../internal/utils';
1
+ import { debug } from '../internal/utils';
2
2
  /**
3
3
  * @summary A view that arranges its children side by side.
4
4
  *
@@ -16,11 +16,9 @@ export class HStack extends HTMLElement {
16
16
  super();
17
17
  }
18
18
  connectedCallback() {
19
- if (devFlags.debug)
20
- console.debug(`${HStack.name} ⚡️ connect`);
19
+ debug(`${HStack.name} ⚡️ connect`);
21
20
  }
22
21
  disconnectedCallback() {
23
- if (devFlags.debug)
24
- console.debug(`${HStack.name} ⚡️ disconnect`);
22
+ debug(`${HStack.name} ⚡️ disconnect`);
25
23
  }
26
24
  }
@@ -1,4 +1,4 @@
1
- import { $, devFlags } from '../internal/utils';
1
+ import { $, debug } from '../internal/utils';
2
2
  import { queryMorph } from '../morphdom';
3
3
  import { html } from '../tpl';
4
4
  /**
@@ -20,8 +20,7 @@ export class ImageView extends HTMLElement {
20
20
  this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
21
21
  }
22
22
  attributeChangedCallback(name, oldValue, newValue) {
23
- if (devFlags.debug)
24
- console.debug(`${ImageView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
23
+ debug(`${ImageView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
25
24
  if (oldValue === newValue)
26
25
  return;
27
26
  switch (name) {
@@ -58,11 +57,9 @@ export class ImageView extends HTMLElement {
58
57
  // container.classList.add(...tokens)
59
58
  }
60
59
  disconnectedCallback() {
61
- if (devFlags.debug)
62
- console.debug(`${ImageView.name} ⚡️ disconnect`);
60
+ debug(`${ImageView.name} ⚡️ disconnect`);
63
61
  }
64
62
  connectedCallback() {
65
- if (devFlags.debug)
66
- console.debug(`${ImageView.name} ⚡️ connect`);
63
+ debug(`${ImageView.name} ⚡️ connect`);
67
64
  }
68
65
  }
@@ -13,6 +13,7 @@ export * from './fine-tooltip';
13
13
  export * from './form-view';
14
14
  export * from './glass-button';
15
15
  export * from './glass-prominent-button';
16
+ export * from './h-divider';
16
17
  export * from './h-stack';
17
18
  export * from './image-view';
18
19
  export * from './label-view';
@@ -45,5 +46,6 @@ export * from './toggle-view';
45
46
  export * from './tool-bar-item-group';
46
47
  export * from './tool-bar-item';
47
48
  export * from './tool-bar';
49
+ export * from './v-divider';
48
50
  export * from './v-keyboard';
49
51
  export * from './v-stack';
@@ -13,6 +13,7 @@ export * from './fine-tooltip';
13
13
  export * from './form-view';
14
14
  export * from './glass-button';
15
15
  export * from './glass-prominent-button';
16
+ export * from './h-divider';
16
17
  export * from './h-stack';
17
18
  export * from './image-view';
18
19
  export * from './label-view';
@@ -45,5 +46,6 @@ export * from './toggle-view';
45
46
  export * from './tool-bar-item-group';
46
47
  export * from './tool-bar-item';
47
48
  export * from './tool-bar';
49
+ export * from './v-divider';
48
50
  export * from './v-keyboard';
49
51
  export * from './v-stack';
@@ -1,4 +1,4 @@
1
- import { $, devFlags } from '../internal/utils';
1
+ import { $, debug } from '../internal/utils';
2
2
  import { queryMorph } from '../morphdom';
3
3
  import { html } from '../tpl';
4
4
  /**
@@ -53,8 +53,7 @@ export class LabelView extends HTMLElement {
53
53
  this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
54
54
  }
55
55
  attributeChangedCallback(name, oldValue, newValue) {
56
- if (devFlags.debug)
57
- console.debug(`${LabelView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
56
+ debug(`${LabelView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
58
57
  if (oldValue === newValue)
59
58
  return;
60
59
  // this.#scheduleReflect()
@@ -77,11 +76,9 @@ export class LabelView extends HTMLElement {
77
76
  }
78
77
  }
79
78
  disconnectedCallback() {
80
- if (devFlags.debug)
81
- console.debug(`${LabelView.name} ⚡️ disconnect`);
79
+ debug(`${LabelView.name} ⚡️ disconnect`);
82
80
  }
83
81
  connectedCallback() {
84
- if (devFlags.debug)
85
- console.debug(`${LabelView.name} ⚡️ connect`);
82
+ debug(`${LabelView.name} ⚡️ connect`);
86
83
  }
87
84
  }
@@ -1,4 +1,4 @@
1
- import { $, devFlags } from '../internal/utils';
1
+ import { $, debug } from '../internal/utils';
2
2
  import { queryMorph } from '../morphdom';
3
3
  import { html } from '../tpl';
4
4
  /**
@@ -65,8 +65,7 @@ export class LabeledContent extends HTMLElement {
65
65
  this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
66
66
  }
67
67
  attributeChangedCallback(name, oldValue, newValue) {
68
- if (devFlags.debug)
69
- console.debug(`${LabeledContent.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
68
+ debug(`${LabeledContent.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
70
69
  if (oldValue === newValue)
71
70
  return;
72
71
  switch (name) {
@@ -100,12 +99,10 @@ export class LabeledContent extends HTMLElement {
100
99
  }
101
100
  }
102
101
  disconnectedCallback() {
103
- if (devFlags.debug)
104
- console.debug(`${LabeledContent.name} ⚡️ disconnect`);
102
+ debug(`${LabeledContent.name} ⚡️ disconnect`);
105
103
  }
106
104
  connectedCallback() {
107
- if (devFlags.debug)
108
- console.debug(`${LabeledContent.name} ⚡️ connect`);
105
+ debug(`${LabeledContent.name} ⚡️ connect`);
109
106
  }
110
107
  // <type>:<locale>;<option>=<value>;<option>=<value>
111
108
  #fmt = (value, format) => {
@@ -1,5 +1,5 @@
1
1
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
- import { devFlags, listActive, onoff } from '../internal/utils';
2
+ import { debug, listActive, onoff } from '../internal/utils';
3
3
  /**
4
4
  * @summary A container view that arranges rows of data in a single column, optionally letting the user select one or more of them.
5
5
  *
@@ -13,13 +13,11 @@ export class ListView extends HTMLElement {
13
13
  super();
14
14
  }
15
15
  disconnectedCallback() {
16
- if (devFlags.debug)
17
- console.debug(`${ListView.name} ⚡️ disconnect`);
16
+ debug(`${ListView.name} ⚡️ disconnect`);
18
17
  CleanupRegistry.unregister(this);
19
18
  }
20
19
  connectedCallback() {
21
- if (devFlags.debug)
22
- console.debug(`${ListView.name} ⚡️ connect`);
20
+ debug(`${ListView.name} ⚡️ connect`);
23
21
  CleanupRegistry.register(this, onoff(listActive(this), this).on());
24
22
  }
25
23
  }
@@ -1,6 +1,6 @@
1
1
  var _a;
2
2
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
3
- import { $, devFlags, onoff, touchGlass } from '../internal/utils';
3
+ import { $, debug, onoff, touchGlass } from '../internal/utils';
4
4
  import { queryMorph } from '../morphdom';
5
5
  import { html } from '../tpl';
6
6
  /**
@@ -34,16 +34,14 @@ export class MenuView extends HTMLElement {
34
34
  this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
35
35
  }
36
36
  attributeChangedCallback(name, oldValue, newValue) {
37
- if (devFlags.debug)
38
- console.debug(`${_a.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
37
+ debug(`${_a.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
39
38
  switch (name) {
40
39
  case 'open':
41
40
  if (!this.#dialog)
42
41
  break;
43
42
  this.#dialog.inert = null === newValue;
44
43
  if (null === newValue && this.#dialog.open) {
45
- if (devFlags.debug)
46
- console.debug(`${_a.name} ⚡️ will-close`);
44
+ debug(`${_a.name} ⚡️ will-close`);
47
45
  this.setAttribute('closing', '');
48
46
  Promise.allSettled(this.#dialog.getAnimations().map(({ finished }) => finished)).then(() => {
49
47
  if (!this.hasAttribute('closing'))
@@ -53,8 +51,7 @@ export class MenuView extends HTMLElement {
53
51
  });
54
52
  }
55
53
  if ('' === newValue && !this.#dialog.open) {
56
- if (devFlags.debug)
57
- console.debug(`${_a.name} ⚡️ will-open`);
54
+ debug(`${_a.name} ⚡️ will-open`);
58
55
  this.removeAttribute('closing');
59
56
  const form = this.#shadowRoot.querySelector('form');
60
57
  form.scrollTop = 0;
@@ -67,16 +64,14 @@ export class MenuView extends HTMLElement {
67
64
  }
68
65
  }
69
66
  disconnectedCallback() {
70
- if (devFlags.debug)
71
- console.debug(`${_a.name} ⚡️ disconnect`);
67
+ debug(`${_a.name} ⚡️ disconnect`);
72
68
  const summaryPart = this.#shadowRoot.querySelector('[part*=menu-summary]'), dialogPart = this.#shadowRoot.querySelector('[part*=menu-dialog]');
73
69
  summaryPart?.style.removeProperty('anchor-name'); //$.prop('anchor-name', null, summaryPart)
74
70
  dialogPart?.style.removeProperty('position-anchor'); //$.prop('position-anchor', null, dialogPart)
75
71
  CleanupRegistry.unregister(this);
76
72
  }
77
73
  connectedCallback() {
78
- if (devFlags.debug)
79
- console.debug(`${_a.name} ⚡️ connect`);
74
+ debug(`${_a.name} ⚡️ connect`);
80
75
  this.#dialog = this.#shadowRoot.querySelector('dialog') ?? undefined;
81
76
  const trigger = this.#shadowRoot.querySelector('button') ?? undefined;
82
77
  CleanupRegistry.register(this, onoff('click', this.#handleTriggerClick, trigger).on());
@@ -100,8 +95,7 @@ export class MenuView extends HTMLElement {
100
95
  dialogPart?.style.setProperty('position-anchor', newAnchorName); // $.prop('position-anchor', newAnchorName, dialogPart) //
101
96
  }
102
97
  #handleDialogClick = ({ type, target }) => {
103
- if (devFlags.debug)
104
- console.debug(`${_a.name} ⚡️ ${type}`);
98
+ debug(`${_a.name} ⚡️ ${type}`);
105
99
  if (!(target instanceof HTMLElement))
106
100
  return;
107
101
  if (target.matches('dialog'))
@@ -118,22 +112,19 @@ export class MenuView extends HTMLElement {
118
112
  // event.stopPropagation() //NOTE: add this only if not nested, disposes all nicely if ommited
119
113
  };
120
114
  #handleTriggerClick = (evt) => {
121
- if (devFlags.debug)
122
- console.debug(`${_a.name} ⚡️ ${evt?.type}`);
115
+ debug(`${_a.name} ⚡️ ${evt?.type}`);
123
116
  this.toggleAttribute('open', true);
124
117
  };
125
118
  // intercept to modify open attr
126
119
  #handleDialogCancel = (evt) => {
127
- if (devFlags.debug)
128
- console.debug(`${_a.name} ⚡️ ${evt?.type}`);
120
+ debug(`${_a.name} ⚡️ ${evt?.type}`);
129
121
  if (!evt.cancelable)
130
122
  return;
131
123
  evt.preventDefault();
132
124
  this.toggleAttribute('open', false);
133
125
  };
134
126
  #handleDialogClose = (evt) => {
135
- if (devFlags.debug)
136
- console.debug(`${_a.name} ⚡️ ${evt?.type}`);
127
+ debug(`${_a.name} ⚡️ ${evt?.type}`);
137
128
  this.toggleAttribute('open', this.#shadowRoot.querySelector('dialog')?.open ?? false);
138
129
  };
139
130
  }
@@ -1,7 +1,7 @@
1
1
  var _a;
2
2
  import { CleanupRegistry } from '../internal/class/cleanup-registry';
3
3
  import { CSSStyleObserver } from '../internal/class/css-style-observer';
4
- import { add, devFlags, frame, onoff, slowHideShow, timeout } from '../internal/utils';
4
+ import { add, debug, frame, onoff, slowHideShow, timeout } from '../internal/utils';
5
5
  import { Snapshot } from '../snapshot';
6
6
  const observing = new WeakSet();
7
7
  function observeResizeEnd(el, callback, stableFrames = 4) {
@@ -83,15 +83,13 @@ export class NavigationLargeTitle extends HTMLElement {
83
83
  super();
84
84
  }
85
85
  disconnectedCallback() {
86
- if (devFlags.debug)
87
- console.debug(`${_a.name} ⚡️ disconnect`);
86
+ debug(`${_a.name} ⚡️ disconnect`);
88
87
  this.#clearScrollState();
89
88
  this.#styleObserver?.disconnect();
90
89
  CleanupRegistry.unregister(this);
91
90
  }
92
91
  connectedCallback() {
93
- if (devFlags.debug)
94
- console.debug(`${_a.name} ⚡️ connect`);
92
+ debug(`${_a.name} ⚡️ connect`);
95
93
  const root = this.closest('scroll-view') ?? undefined;
96
94
  if (!root)
97
95
  return;
@@ -114,8 +112,7 @@ export class NavigationLargeTitle extends HTMLElement {
114
112
  });
115
113
  }
116
114
  #handleStyleChange = () => {
117
- if (devFlags.debug)
118
- console.debug(`${_a.name} ⚡️ style`);
115
+ debug(`${_a.name} ⚡️ style`);
119
116
  const root = this.closest('scroll-view') ?? undefined;
120
117
  if (!root)
121
118
  return;
@@ -160,8 +157,7 @@ export class NavigationLargeTitle extends HTMLElement {
160
157
  // this.#applySlowness(root, isIntersecting)
161
158
  // }
162
159
  #handleIntersect = (entries, { root }) => {
163
- if (devFlags.debug)
164
- console.debug(`${_a.name} ⚡️ intersect (${entries?.at(0)?.isIntersecting})`);
160
+ debug(`${_a.name} ⚡️ intersect (${entries?.at(0)?.isIntersecting})`);
165
161
  if (!(root instanceof HTMLElement))
166
162
  return;
167
163
  for (const { isIntersecting } of entries)
@@ -1,5 +1,5 @@
1
1
  import { NavigationView } from '../internal/class/navigation-view';
2
- import { devFlags } from '../internal/utils';
2
+ import { debug } from '../internal/utils';
3
3
  /**
4
4
  * @summary A container view with two or three side-by-side screens, where what the user chooses in the left screen changes what appears in the next screen.
5
5
  */
@@ -8,18 +8,15 @@ export class NavigationSplitView extends NavigationView {
8
8
  super();
9
9
  }
10
10
  attributeChangedCallback(name, oldValue, newValue) {
11
- if (devFlags.debug)
12
- console.debug(`${NavigationSplitView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
11
+ debug(`${NavigationSplitView.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
13
12
  super.attributeChangedCallback(name, oldValue, newValue);
14
13
  }
15
14
  disconnectedCallback() {
16
- if (devFlags.debug)
17
- console.debug(`${NavigationSplitView.name} ⚡️ disconnect`);
15
+ debug(`${NavigationSplitView.name} ⚡️ disconnect`);
18
16
  super.disconnectedCallback();
19
17
  }
20
18
  connectedCallback() {
21
- if (devFlags.debug)
22
- console.debug(`${NavigationSplitView.name} ⚡️ connect`);
19
+ debug(`${NavigationSplitView.name} ⚡️ connect`);
23
20
  super.connectedCallback();
24
21
  }
25
22
  }
@@ -1,5 +1,5 @@
1
1
  import { NavigationView } from '../internal/class/navigation-view';
2
- import { devFlags } from '../internal/utils';
2
+ import { debug } from '../internal/utils';
3
3
  /**
4
4
  * @summary A container view that shows a main screen and lets the user open other screens on top of it.
5
5
  */
@@ -8,8 +8,7 @@ export class NavigationStack extends NavigationView {
8
8
  super();
9
9
  }
10
10
  attributeChangedCallback(name, oldValue, newValue) {
11
- if (devFlags.debug)
12
- console.debug(`${NavigationStack.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
11
+ debug(`${NavigationStack.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
13
12
  super.attributeChangedCallback(name, oldValue, newValue);
14
13
  switch (name) {
15
14
  case 'hidden':
@@ -17,13 +16,11 @@ export class NavigationStack extends NavigationView {
17
16
  }
18
17
  }
19
18
  disconnectedCallback() {
20
- if (devFlags.debug)
21
- console.debug(`${NavigationStack.name} ⚡️ disconnect`);
19
+ debug(`${NavigationStack.name} ⚡️ disconnect`);
22
20
  super.disconnectedCallback();
23
21
  }
24
22
  connectedCallback() {
25
- if (devFlags.debug)
26
- console.debug(`${NavigationStack.name} ⚡️ connect`);
23
+ debug(`${NavigationStack.name} ⚡️ connect`);
27
24
  super.connectedCallback();
28
25
  }
29
26
  }
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  var NavigationTitle_1;
8
8
  import { microtaskOnConnected } from '../internal/decorators';
9
- import { devFlags } from '../internal/utils';
9
+ import { debug } from '../internal/utils';
10
10
  import { queryMorph } from '../morphdom';
11
11
  import { html } from '../tpl';
12
12
  /**
@@ -22,17 +22,14 @@ let NavigationTitle = NavigationTitle_1 = class NavigationTitle extends HTMLElem
22
22
  super();
23
23
  }
24
24
  attributeChangedCallback(name, oldValue, newValue) {
25
- if (devFlags.debug)
26
- console.debug(`${NavigationTitle_1.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
25
+ debug(`${NavigationTitle_1.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
27
26
  this.#render(this.getAttribute('value'), this.getAttribute('subtitle'), this.getAttribute('system-image'), this.getAttribute('system-image-weight'));
28
27
  }
29
28
  disconnectedCallback() {
30
- if (devFlags.debug)
31
- console.debug(`${NavigationTitle_1.name} ⚡️ disconnect`);
29
+ debug(`${NavigationTitle_1.name} ⚡️ disconnect`);
32
30
  }
33
31
  connectedCallback() {
34
- if (devFlags.debug)
35
- console.debug(`${NavigationTitle_1.name} ⚡️ connect`);
32
+ debug(`${NavigationTitle_1.name} ⚡️ connect`);
36
33
  }
37
34
  #render = (title, subtitle, systemImage, systemImageWeight) => {
38
35
  queryMorph(':not([slot])', html `