@breadstone/mosaik-elements-foundation 0.0.120 → 0.0.121
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.
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonElementValueAccessor.d.ts +1 -1
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonElementValueAccessor.d.ts.map +1 -1
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonElementValueAccessor.js +2 -3
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonElementValueAccessor.js.map +1 -1
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonGroupElementValueAccessor.d.ts +32 -0
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonGroupElementValueAccessor.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonGroupElementValueAccessor.js +39 -0
- package/Controls/Components/Buttons/ToggleButton/Accessors/ToggleButtonGroupElementValueAccessor.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Events/ToggleButtonGroupChangedEventDetail.d.ts +16 -0
- package/Controls/Components/Buttons/ToggleButton/Events/ToggleButtonGroupChangedEventDetail.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Events/ToggleButtonGroupChangedEventDetail.js +4 -0
- package/Controls/Components/Buttons/ToggleButton/Events/ToggleButtonGroupChangedEventDetail.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementEvents.d.ts +11 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementEvents.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementEvents.js +3 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementEvents.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementProps.d.ts +15 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementProps.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementProps.js +3 -0
- package/Controls/Components/Buttons/ToggleButton/IToggleButtonGroupElementProps.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Cosmopolitan.d.ts +6 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Cosmopolitan.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Cosmopolitan.js +183 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Cosmopolitan.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Joy.d.ts +6 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Joy.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Joy.js +372 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Joy.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Retro.d.ts +6 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Retro.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Retro.js +189 -0
- package/Controls/Components/Buttons/ToggleButton/Themes/ToggleButtonGroupElement.Retro.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElement.d.ts +129 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElement.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElement.js +277 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElement.js.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElementTemplate.d.ts +8 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElementTemplate.d.ts.map +1 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElementTemplate.js +15 -0
- package/Controls/Components/Buttons/ToggleButton/ToggleButtonGroupElementTemplate.js.map +1 -0
- package/Controls/Components/Forms/FormElement.d.ts +5 -5
- package/Controls/Components/Forms/FormElement.d.ts.map +1 -1
- package/Controls/Components/Forms/FormElement.js +12 -12
- package/Controls/Components/Forms/FormElement.js.map +1 -1
- package/Controls/Components/Inputs/CheckBox/CheckBoxGroupElement.d.ts.map +1 -1
- package/Controls/Components/Inputs/CheckBox/CheckBoxGroupElement.js +5 -3
- package/Controls/Components/Inputs/CheckBox/CheckBoxGroupElement.js.map +1 -1
- package/Controls/Components/Inputs/Choice/ChoiceGroupElement.d.ts.map +1 -1
- package/Controls/Components/Inputs/Choice/ChoiceGroupElement.js +5 -3
- package/Controls/Components/Inputs/Choice/ChoiceGroupElement.js.map +1 -1
- package/Controls/Components/Inputs/Radio/RadioElement.d.ts.map +1 -1
- package/Controls/Components/Inputs/Radio/RadioElement.js +4 -0
- package/Controls/Components/Inputs/Radio/RadioElement.js.map +1 -1
- package/Controls/Components/Inputs/Radio/RadioGroupElement.d.ts.map +1 -1
- package/Controls/Components/Inputs/Radio/RadioGroupElement.js +5 -3
- package/Controls/Components/Inputs/Radio/RadioGroupElement.js.map +1 -1
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Cosmopolitan.d.ts.map +1 -1
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Cosmopolitan.js +1 -8
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Cosmopolitan.js.map +1 -1
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Joy.js +5 -12
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Joy.js.map +1 -1
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Retro.d.ts.map +1 -1
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Retro.js +1 -8
- package/Controls/Components/Inputs/Radio/Themes/RadioElement.Retro.js.map +1 -1
- package/Controls/Components/Layouts/Dock/DockPanelElement.d.ts +124 -0
- package/Controls/Components/Layouts/Dock/DockPanelElement.d.ts.map +1 -0
- package/Controls/Components/Layouts/Dock/DockPanelElement.js +317 -0
- package/Controls/Components/Layouts/Dock/DockPanelElement.js.map +1 -0
- package/Controls/Components/Layouts/Dock/DockPanelElementTemplate.d.ts +9 -0
- package/Controls/Components/Layouts/Dock/DockPanelElementTemplate.d.ts.map +1 -0
- package/Controls/Components/Layouts/Dock/DockPanelElementTemplate.js +22 -0
- package/Controls/Components/Layouts/Dock/DockPanelElementTemplate.js.map +1 -0
- package/Controls/Components/Layouts/Dock/IDockPanelElementProps.d.ts +15 -0
- package/Controls/Components/Layouts/Dock/IDockPanelElementProps.d.ts.map +1 -0
- package/Controls/Components/Layouts/Dock/IDockPanelElementProps.js +2 -0
- package/Controls/Components/Layouts/Dock/IDockPanelElementProps.js.map +1 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Cosmopolitan.d.ts +6 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Cosmopolitan.d.ts.map +1 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Cosmopolitan.js +79 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Cosmopolitan.js.map +1 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Joy.d.ts +6 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Joy.d.ts.map +1 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Joy.js +79 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Joy.js.map +1 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Retro.d.ts +6 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Retro.d.ts.map +1 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Retro.js +79 -0
- package/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Retro.js.map +1 -0
- package/Controls/Components/Layouts/TileList/Themes/TileListItemElement.Joy.js +7 -7
- package/Controls/Components/Media/Chat/ChatHeaderElementTemplate.d.ts.map +1 -1
- package/Controls/Components/Media/Chat/ChatHeaderElementTemplate.js +1 -2
- package/Controls/Components/Media/Chat/ChatHeaderElementTemplate.js.map +1 -1
- package/Controls/Components/Media/Chat/ChatInputElementTemplate.d.ts.map +1 -1
- package/Controls/Components/Media/Chat/ChatInputElementTemplate.js +0 -1
- package/Controls/Components/Media/Chat/ChatInputElementTemplate.js.map +1 -1
- package/Controls/Components/Media/Chat/ChatMarkerElementTemplate.d.ts.map +1 -1
- package/Controls/Components/Media/Chat/ChatMarkerElementTemplate.js +2 -1
- package/Controls/Components/Media/Chat/ChatMarkerElementTemplate.js.map +1 -1
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Cosmopolitan.d.ts.map +1 -1
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Cosmopolitan.js +4 -0
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Cosmopolitan.js.map +1 -1
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Joy.js +4 -0
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Joy.js.map +1 -1
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Retro.d.ts.map +1 -1
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Retro.js +4 -0
- package/Controls/Components/Media/Chat/Themes/ChatMarkerElement.Retro.js.map +1 -1
- package/Controls/Components/Primitives/Abstracts/Toggable/ToggableElement.d.ts +1 -1
- package/Controls/Components/Primitives/Abstracts/Toggable/ToggableElement.d.ts.map +1 -1
- package/Controls/Components/Primitives/Abstracts/Toggable/ToggableElement.js +10 -4
- package/Controls/Components/Primitives/Abstracts/Toggable/ToggableElement.js.map +1 -1
- package/Controls/Components/Primitives/Checkmark/CheckmarkElement.d.ts.map +1 -1
- package/Controls/Components/Primitives/Checkmark/CheckmarkElement.js +5 -1
- package/Controls/Components/Primitives/Checkmark/CheckmarkElement.js.map +1 -1
- package/Controls/Components/Primitives/Checkmark/Themes/CheckmarkElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Primitives/Checkmark/Themes/CheckmarkElement.Joy.js +110 -3
- package/Controls/Components/Primitives/Checkmark/Themes/CheckmarkElement.Joy.js.map +1 -1
- package/Controls/Components/Ranges/ScrubSlider/ScrubSliderElement.d.ts +4 -1
- package/Controls/Components/Ranges/ScrubSlider/ScrubSliderElement.d.ts.map +1 -1
- package/Controls/Components/Ranges/ScrubSlider/ScrubSliderElement.js +4 -1
- package/Controls/Components/Ranges/ScrubSlider/ScrubSliderElement.js.map +1 -1
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Cosmopolitan.d.ts.map +1 -1
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Cosmopolitan.js +5 -0
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Cosmopolitan.js.map +1 -1
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Joy.js +5 -0
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Joy.js.map +1 -1
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Retro.d.ts.map +1 -1
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Retro.js +5 -0
- package/Controls/Components/Selectors/Wizard/Themes/WizardElement.Retro.js.map +1 -1
- package/Controls/Components/Selectors/Wizard/WizardElement.d.ts +2 -1
- package/Controls/Components/Selectors/Wizard/WizardElement.d.ts.map +1 -1
- package/Controls/Components/Selectors/Wizard/WizardElement.js +9 -2
- package/Controls/Components/Selectors/Wizard/WizardElement.js.map +1 -1
- package/Controls/Components/Selectors/Wizard/WizardElementTemplate.d.ts.map +1 -1
- package/Controls/Components/Selectors/Wizard/WizardElementTemplate.js +16 -9
- package/Controls/Components/Selectors/Wizard/WizardElementTemplate.js.map +1 -1
- package/Controls/Components/Selectors/Wizard/WizardStepElement.d.ts.map +1 -1
- package/Controls/Components/Selectors/Wizard/WizardStepElement.js +4 -0
- package/Controls/Components/Selectors/Wizard/WizardStepElement.js.map +1 -1
- package/Index.d.ts +5 -0
- package/Index.d.ts.map +1 -1
- package/Index.js +3 -0
- package/Index.js.map +1 -1
- package/Routing/PathToRegexp.d.ts +1 -1
- package/custom-elements.json +1466 -381
- package/package.json +3 -3
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
// #region Imports
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var DockPanelElement_1;
|
|
12
|
+
import { Attribute } from '../../../Decorators/AttributeDecorator';
|
|
13
|
+
import { Component } from '../../../Decorators/ComponentDecorator';
|
|
14
|
+
import { Themeable } from '../../../Behaviors/Themeable';
|
|
15
|
+
import { Fitable } from '../../../Behaviors/Fitable';
|
|
16
|
+
import { Orientable } from '../../../Behaviors/Orientable';
|
|
17
|
+
import { Reversible } from '../../../Behaviors/Reversible';
|
|
18
|
+
import { Gapable } from '../../../Behaviors/Gapable';
|
|
19
|
+
import { LayoutElement } from '../Abstracts/LayoutElement';
|
|
20
|
+
import { dockPanelElementTemplate } from './DockPanelElementTemplate';
|
|
21
|
+
import { CssLength } from '@breadstone/mosaik-themes';
|
|
22
|
+
/**
|
|
23
|
+
* DockPanel - A layout component used to arrange child components by docking them to specific edges or filling the remaining space.
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
* The DockPanel component is a powerful layout element that allows child components or elements to be docked
|
|
27
|
+
* to the top, bottom, left, or right edges of the container, while optionally letting one element fill the
|
|
28
|
+
* remaining available space. This makes it ideal for constructing flexible and adaptive interfaces such as
|
|
29
|
+
* application shells, sidebars, headers, footers, and content regions.
|
|
30
|
+
*
|
|
31
|
+
* DockPanel layouts provide developers with fine-grained control over how elements are positioned relative
|
|
32
|
+
* to each other, ensuring that UIs remain both structured and responsive without relying heavily on manual
|
|
33
|
+
* CSS positioning.
|
|
34
|
+
*
|
|
35
|
+
* @element mosaik-dock-panel
|
|
36
|
+
* @category Layout
|
|
37
|
+
*
|
|
38
|
+
* @slot - The default slot for child elements to be docked.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```html
|
|
42
|
+
* <mosaik-dock-panel>
|
|
43
|
+
* <div dock="top">Header</div>
|
|
44
|
+
* <div dock="left">Sidebar</div>
|
|
45
|
+
* <div dock="content">Main Content</div>
|
|
46
|
+
* <div dock="bottom">Footer</div>
|
|
47
|
+
* </mosaik-dock-panel>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
let DockPanelElement = DockPanelElement_1 = class DockPanelElement extends Themeable(Reversible(Orientable(Fitable(Gapable(LayoutElement))))) {
|
|
53
|
+
// #region Fields
|
|
54
|
+
_childResize;
|
|
55
|
+
_lastChildFill;
|
|
56
|
+
_hostResize;
|
|
57
|
+
_pending;
|
|
58
|
+
// #endregion
|
|
59
|
+
// #region Ctor
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a new instance of the `{@link DockPanelElement}` class.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
constructor() {
|
|
66
|
+
super();
|
|
67
|
+
this._childResize = new Map();
|
|
68
|
+
this._lastChildFill = false;
|
|
69
|
+
this._pending = false;
|
|
70
|
+
}
|
|
71
|
+
// #endregion
|
|
72
|
+
/**
|
|
73
|
+
* Returns the `is` property.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
* @static
|
|
77
|
+
* @override
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
static get is() {
|
|
81
|
+
return 'mosaik-dock-panel';
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The `lastChildFill` property determines whether the last child element should fill the remaining space.
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
* @attr
|
|
88
|
+
*/
|
|
89
|
+
get lastChildFill() {
|
|
90
|
+
return this._lastChildFill;
|
|
91
|
+
}
|
|
92
|
+
set lastChildFill(value) {
|
|
93
|
+
if (this._lastChildFill !== value) {
|
|
94
|
+
this._lastChildFill = value;
|
|
95
|
+
this.requestUpdate('lastChildFill');
|
|
96
|
+
this.scheduleLayout();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// #region Methods
|
|
100
|
+
static getDock(el) {
|
|
101
|
+
const raw = el.getAttribute('dock') ??
|
|
102
|
+
el.getAttribute('data-dock') ??
|
|
103
|
+
el.getAttribute('dock-panel-dock') ??
|
|
104
|
+
(el.dir === 'rtl' ? 'right' : 'left');
|
|
105
|
+
const v = raw.toLowerCase();
|
|
106
|
+
return v === 'left' || v === 'right' || v === 'top' || v === 'bottom' ? v : 'left';
|
|
107
|
+
}
|
|
108
|
+
static setDock(el, dock) {
|
|
109
|
+
el.setAttribute('dock', dock);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @public
|
|
113
|
+
* @override
|
|
114
|
+
*/
|
|
115
|
+
disconnectedCallback() {
|
|
116
|
+
super.disconnectedCallback();
|
|
117
|
+
this.cleanupObservers();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* @protected
|
|
121
|
+
* @override
|
|
122
|
+
*/
|
|
123
|
+
onApplyTemplate() {
|
|
124
|
+
super.onApplyTemplate();
|
|
125
|
+
this._hostResize = new ResizeObserver(() => this.scheduleLayout());
|
|
126
|
+
this._hostResize.observe(this);
|
|
127
|
+
this.reobserveChildren();
|
|
128
|
+
this.scheduleLayout();
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @protected
|
|
132
|
+
* @override
|
|
133
|
+
*/
|
|
134
|
+
onItemsChanged() {
|
|
135
|
+
super.onItemsChanged();
|
|
136
|
+
this.reobserveChildren();
|
|
137
|
+
this.scheduleLayout();
|
|
138
|
+
}
|
|
139
|
+
// #endregion
|
|
140
|
+
/**
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
reobserveChildren() {
|
|
144
|
+
for (const ro of this._childResize.values())
|
|
145
|
+
ro.disconnect();
|
|
146
|
+
this._childResize.clear();
|
|
147
|
+
const kids = this.items;
|
|
148
|
+
for (const el of kids) {
|
|
149
|
+
const ro = new ResizeObserver(() => this.scheduleLayout());
|
|
150
|
+
ro.observe(el);
|
|
151
|
+
this._childResize.set(el, ro);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* @private
|
|
156
|
+
*/
|
|
157
|
+
cleanupObservers() {
|
|
158
|
+
this._hostResize?.disconnect();
|
|
159
|
+
for (const ro of this._childResize.values())
|
|
160
|
+
ro.disconnect();
|
|
161
|
+
this._childResize.clear();
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @private
|
|
165
|
+
*/
|
|
166
|
+
scheduleLayout() {
|
|
167
|
+
if (this._pending) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this._pending = true;
|
|
171
|
+
requestAnimationFrame(() => {
|
|
172
|
+
this._pending = false;
|
|
173
|
+
this.layoutNow();
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @private
|
|
178
|
+
*/
|
|
179
|
+
layoutNow() {
|
|
180
|
+
const surface = this.getTemplatePart('surface');
|
|
181
|
+
// if (!surface) {
|
|
182
|
+
// return;
|
|
183
|
+
// }
|
|
184
|
+
// CssLength → px
|
|
185
|
+
const gapPx = this.resolveCssLengthToPx(this.gap, surface);
|
|
186
|
+
const W = surface.clientWidth;
|
|
187
|
+
const H = surface.clientHeight;
|
|
188
|
+
if (W <= 0 || H <= 0) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
let x = 0, y = 0, w = W, h = H;
|
|
192
|
+
const kids = this.items.filter((el) => this.isVisible(el));
|
|
193
|
+
const n = kids.length;
|
|
194
|
+
for (const el of kids)
|
|
195
|
+
this.prepForMeasure(el);
|
|
196
|
+
for (let i = 0; i < n; i++) {
|
|
197
|
+
const el = kids[i];
|
|
198
|
+
const isLast = i === n - 1;
|
|
199
|
+
const dock = DockPanelElement_1.getDock(el);
|
|
200
|
+
if (isLast && this._lastChildFill) {
|
|
201
|
+
this.place(el, x, y, w, h);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
switch (dock) {
|
|
205
|
+
case 'top': {
|
|
206
|
+
this.place(el, x, y, w, undefined);
|
|
207
|
+
const usedH = Math.ceil(el.getBoundingClientRect().height);
|
|
208
|
+
this.place(el, x, y, w, usedH);
|
|
209
|
+
y += usedH + gapPx;
|
|
210
|
+
h -= usedH + gapPx;
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
case 'bottom': {
|
|
214
|
+
this.place(el, x, y + Math.max(0, h - 1), w, undefined);
|
|
215
|
+
const usedH = Math.ceil(el.getBoundingClientRect().height);
|
|
216
|
+
const top = y + h - usedH;
|
|
217
|
+
this.place(el, x, top, w, usedH);
|
|
218
|
+
h -= usedH + gapPx;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
case 'left': {
|
|
222
|
+
this.place(el, x, y, undefined, h);
|
|
223
|
+
const usedW = Math.ceil(el.getBoundingClientRect().width);
|
|
224
|
+
this.place(el, x, y, usedW, h);
|
|
225
|
+
x += usedW + gapPx;
|
|
226
|
+
w -= usedW + gapPx;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
case 'right': {
|
|
230
|
+
this.place(el, x + Math.max(0, w - 1), y, undefined, h);
|
|
231
|
+
const usedW = Math.ceil(el.getBoundingClientRect().width);
|
|
232
|
+
const left = x + w - usedW;
|
|
233
|
+
this.place(el, left, y, usedW, h);
|
|
234
|
+
w -= usedW + gapPx;
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
resolveCssLengthToPx(value, surface) {
|
|
244
|
+
if (value === undefined) {
|
|
245
|
+
return 0;
|
|
246
|
+
}
|
|
247
|
+
if (value === 'auto') {
|
|
248
|
+
return 0;
|
|
249
|
+
}
|
|
250
|
+
if (typeof value === 'number') {
|
|
251
|
+
return value; // treat bare numbers as px
|
|
252
|
+
}
|
|
253
|
+
if (!CssLength.isCssLength(value)) {
|
|
254
|
+
return 0;
|
|
255
|
+
}
|
|
256
|
+
// Use a hidden probe element to let the browser compute absolute pixels for us.
|
|
257
|
+
const probe = document.createElement('div');
|
|
258
|
+
probe.style.position = 'absolute';
|
|
259
|
+
probe.style.visibility = 'hidden';
|
|
260
|
+
probe.style.pointerEvents = 'none';
|
|
261
|
+
probe.style.width = value;
|
|
262
|
+
probe.style.height = '0';
|
|
263
|
+
// Use the layout surface as the containing block for % and font-relative units.
|
|
264
|
+
surface.appendChild(probe);
|
|
265
|
+
const px = probe.getBoundingClientRect().width;
|
|
266
|
+
surface.removeChild(probe);
|
|
267
|
+
// Normalize to non-negative integer pixels to avoid subpixel accumulation jitter
|
|
268
|
+
return Math.max(0, Math.round(px));
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* @private
|
|
272
|
+
*/
|
|
273
|
+
isVisible(el) {
|
|
274
|
+
const s = getComputedStyle(el);
|
|
275
|
+
return s.display !== 'none' && s.visibility !== 'hidden';
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* @private
|
|
279
|
+
*/
|
|
280
|
+
prepForMeasure(el) {
|
|
281
|
+
el.style.position = 'absolute';
|
|
282
|
+
el.style.left = '0px';
|
|
283
|
+
el.style.top = '0px';
|
|
284
|
+
el.style.right = '';
|
|
285
|
+
el.style.bottom = '';
|
|
286
|
+
el.style.width = '';
|
|
287
|
+
el.style.height = '';
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @private
|
|
291
|
+
*/
|
|
292
|
+
place(el, left, top, width, height) {
|
|
293
|
+
el.style.position = 'absolute';
|
|
294
|
+
el.style.left = `${left}px`;
|
|
295
|
+
el.style.top = `${top}px`;
|
|
296
|
+
el.style.width = width === undefined ? '' : `${width}px`;
|
|
297
|
+
el.style.height = height === undefined ? '' : `${height}px`;
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
__decorate([
|
|
301
|
+
Attribute({
|
|
302
|
+
type: Boolean,
|
|
303
|
+
useDefault: true
|
|
304
|
+
}),
|
|
305
|
+
__metadata("design:type", Boolean),
|
|
306
|
+
__metadata("design:paramtypes", [Boolean])
|
|
307
|
+
], DockPanelElement.prototype, "lastChildFill", null);
|
|
308
|
+
DockPanelElement = DockPanelElement_1 = __decorate([
|
|
309
|
+
Component({
|
|
310
|
+
selector: 'mosaik-dock-panel',
|
|
311
|
+
template: dockPanelElementTemplate,
|
|
312
|
+
imports: []
|
|
313
|
+
}),
|
|
314
|
+
__metadata("design:paramtypes", [])
|
|
315
|
+
], DockPanelElement);
|
|
316
|
+
export { DockPanelElement };
|
|
317
|
+
//# sourceMappingURL=DockPanelElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElement.js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CAAC;QACrB,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QACpB,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,EAAe,EAAE,IAAY,EAAE,GAAW,EAAE,KAAc,EAAE,MAAe;QACrF,EAAE,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QAC/B,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC;QAC5B,EAAE,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;QAC1B,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC;QACzD,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC;IAChE,CAAC;CAIJ,CAAA;AAzPG;IAAC,SAAS,CAAC;QACP,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,IAAI;KACnB,CAAC;;;qDAGD;AAtDQ,gBAAgB;IAL5B,SAAS,CAAC;QACP,QAAQ,EAAE,mBAAmB;QAC7B,QAAQ,EAAE,wBAAwB;QAClC,OAAO,EAAE,EAAE;KACd,CAAC;;GACW,gBAAgB,CAyS5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TemplateResult } from '../../../../Dom/Html';
|
|
2
|
+
import type { DockPanelElement } from './DockPanelElement';
|
|
3
|
+
/**
|
|
4
|
+
* The template of the {@link GridElement}.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function dockPanelElementTemplate<T extends DockPanelElement>(e: T): TemplateResult;
|
|
9
|
+
//# sourceMappingURL=DockPanelElementTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElementTemplate.d.ts","sourceRoot":"","sources":["../../../../../src/Controls/Components/Layouts/Dock/DockPanelElementTemplate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,EAAE,CAAC,EAAE,CAAC,GAAG,cAAc,CAWzF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable lit/prefer-static-styles */
|
|
2
|
+
// #region Imports
|
|
3
|
+
import { html } from '../../../../Dom/Html';
|
|
4
|
+
// #endregion
|
|
5
|
+
/**
|
|
6
|
+
* The template of the {@link GridElement}.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export function dockPanelElementTemplate(e) {
|
|
11
|
+
return html `
|
|
12
|
+
<style>
|
|
13
|
+
:host {
|
|
14
|
+
--dock-panel-gap: ${e.gap};
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
<div part="surface">
|
|
18
|
+
<slot></slot>
|
|
19
|
+
</div>
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=DockPanelElementTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElementTemplate.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Layouts/Dock/DockPanelElementTemplate.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,kBAAkB;AAElB,OAAO,EAAE,IAAI,EAAuB,MAAM,sBAAsB,CAAC;AAGjE,aAAa;AAEb;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAA6B,CAAI;IACrE,OAAO,IAAI,CAAA;;;oCAGqB,CAAC,CAAC,GAAG;;;;;;KAMpC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the public props of `DockPanelElement`.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IDockPanelElementProps {
|
|
7
|
+
/**
|
|
8
|
+
* If true, the last visible child fills the remaining space.
|
|
9
|
+
*
|
|
10
|
+
* @default true
|
|
11
|
+
* @attr last-child-fill
|
|
12
|
+
*/
|
|
13
|
+
lastChildFill: boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=IDockPanelElementProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDockPanelElementProps.d.ts","sourceRoot":"","sources":["../../../../../src/Controls/Components/Layouts/Dock/IDockPanelElementProps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IAEnC;;;;;OAKG;IACH,aAAa,EAAE,OAAO,CAAC;CAE1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDockPanelElementProps.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Layouts/Dock/IDockPanelElementProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElement.Cosmopolitan.d.ts","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Cosmopolitan.ts"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,iCAAiC,IAAI,SAAS,CAiE7D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// ------------------------------------------------------------------------------
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// This code was generated by a tool.
|
|
4
|
+
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5
|
+
// </auto-generated>
|
|
6
|
+
// ------------------------------------------------------------------------------
|
|
7
|
+
// #region Imports
|
|
8
|
+
import { css } from '../../../../../Dom/Css';
|
|
9
|
+
// #endregion
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export function dockPanelElementCosmopolitanStyle() {
|
|
14
|
+
return css `
|
|
15
|
+
:host {
|
|
16
|
+
--dock-panel-font-family: unset;
|
|
17
|
+
--dock-panel-font-letter-spacing: unset;
|
|
18
|
+
--dock-panel-font-line-height: unset;
|
|
19
|
+
--dock-panel-font-size: unset;
|
|
20
|
+
--dock-panel-font-text-decoration: unset;
|
|
21
|
+
--dock-panel-font-text-transform: unset;
|
|
22
|
+
--dock-panel-font-weight: unset;
|
|
23
|
+
--dock-panel-gap: unset;
|
|
24
|
+
--dock-panel-padding-bottom: unset;
|
|
25
|
+
--dock-panel-padding-left: unset;
|
|
26
|
+
--dock-panel-padding-right: unset;
|
|
27
|
+
--dock-panel-padding-top: unset;
|
|
28
|
+
--dock-panel-transition-duration: unset;
|
|
29
|
+
--dock-panel-transition-mode: unset;
|
|
30
|
+
--dock-panel-transition-property: unset;
|
|
31
|
+
--dock-panel-translate: unset;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
35
|
+
:host {
|
|
36
|
+
transition-duration: .01ms;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
display: block;
|
|
43
|
+
position: relative;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host *, :host :before, :host :after {
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
background-repeat: no-repeat;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host :before, :host :after {
|
|
52
|
+
text-decoration: inherit;
|
|
53
|
+
vertical-align: inherit;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([hidden]) {
|
|
57
|
+
display: none !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host {
|
|
61
|
+
gap: var(--dock-panel-gap);
|
|
62
|
+
display: block;
|
|
63
|
+
position: relative;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host [part="surface"] {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host ::slotted(*) {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=DockPanelElement.Cosmopolitan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElement.Cosmopolitan.js","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Cosmopolitan.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,mBAAmB;AACnB,yCAAyC;AACzC,qGAAqG;AACrG,oBAAoB;AACpB,iFAAiF;AAEjF,kBAAkB;AAElB,OAAO,EAAE,GAAG,EAAkB,MAAM,wBAAwB,CAAC;AAE7D,aAAa;AAEb;;GAEG;AACH,MAAM,UAAU,iCAAiC;IAC7C,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+DT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElement.Joy.d.ts","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Joy.ts"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,SAAS,CAiEpD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// ------------------------------------------------------------------------------
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// This code was generated by a tool.
|
|
4
|
+
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5
|
+
// </auto-generated>
|
|
6
|
+
// ------------------------------------------------------------------------------
|
|
7
|
+
// #region Imports
|
|
8
|
+
import { css } from '../../../../../Dom/Css';
|
|
9
|
+
// #endregion
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export function dockPanelElementJoyStyle() {
|
|
14
|
+
return css `
|
|
15
|
+
:host {
|
|
16
|
+
--dock-panel-font-family: unset;
|
|
17
|
+
--dock-panel-font-letter-spacing: unset;
|
|
18
|
+
--dock-panel-font-line-height: unset;
|
|
19
|
+
--dock-panel-font-size: unset;
|
|
20
|
+
--dock-panel-font-text-decoration: unset;
|
|
21
|
+
--dock-panel-font-text-transform: unset;
|
|
22
|
+
--dock-panel-font-weight: unset;
|
|
23
|
+
--dock-panel-gap: unset;
|
|
24
|
+
--dock-panel-padding-bottom: unset;
|
|
25
|
+
--dock-panel-padding-left: unset;
|
|
26
|
+
--dock-panel-padding-right: unset;
|
|
27
|
+
--dock-panel-padding-top: unset;
|
|
28
|
+
--dock-panel-transition-duration: unset;
|
|
29
|
+
--dock-panel-transition-mode: unset;
|
|
30
|
+
--dock-panel-transition-property: unset;
|
|
31
|
+
--dock-panel-translate: unset;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
35
|
+
:host {
|
|
36
|
+
transition-duration: .01ms;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
display: block;
|
|
43
|
+
position: relative;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host *, :host :before, :host :after {
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
background-repeat: no-repeat;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host :before, :host :after {
|
|
52
|
+
text-decoration: inherit;
|
|
53
|
+
vertical-align: inherit;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([hidden]) {
|
|
57
|
+
display: none !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host {
|
|
61
|
+
gap: var(--dock-panel-gap);
|
|
62
|
+
display: block;
|
|
63
|
+
position: relative;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host [part="surface"] {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host ::slotted(*) {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=DockPanelElement.Joy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElement.Joy.js","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Joy.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,mBAAmB;AACnB,yCAAyC;AACzC,qGAAqG;AACrG,oBAAoB;AACpB,iFAAiF;AAEjF,kBAAkB;AAElB,OAAO,EAAE,GAAG,EAAkB,MAAM,wBAAwB,CAAC;AAE7D,aAAa;AAEb;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACpC,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+DT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockPanelElement.Retro.d.ts","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Layouts/Dock/Themes/DockPanelElement.Retro.ts"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,CAiEtD"}
|