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

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