@jimka/typescript-ui 0.2.0 → 0.3.0
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/README.md +4 -0
- package/THIRD-PARTY-NOTICES.md +7 -3
- package/dist/lib/{AbstractBooleanInput-BGesvIZy.js → AbstractBooleanInput-C3O4kv7_.js} +2 -2
- package/dist/lib/{AbstractBooleanInput-BGesvIZy.js.map → AbstractBooleanInput-C3O4kv7_.js.map} +1 -1
- package/dist/lib/{AbstractInput-BxOtFrER.js → AbstractInput-DFWniHqq.js} +2 -2
- package/dist/lib/{AbstractInput-BxOtFrER.js.map → AbstractInput-DFWniHqq.js.map} +1 -1
- package/dist/lib/AnchorConstraints-CSUcj8Wx.js +2 -0
- package/dist/lib/AnchorConstraints-CSUcj8Wx.js.map +1 -0
- package/dist/lib/{AnimatedDropdown-CZQEqQi-.js → AnimatedDropdown-e9urCXK1.js} +2 -2
- package/dist/lib/{AnimatedDropdown-CZQEqQi-.js.map → AnimatedDropdown-e9urCXK1.js.map} +1 -1
- package/dist/lib/Border-Dq6dXkmS.js +2 -0
- package/dist/lib/{Border-BgaZkc1R.js.map → Border-Dq6dXkmS.js.map} +1 -1
- package/dist/lib/{Button-U1rsP4v8.js → Button-B36rBMKC.js} +2 -2
- package/dist/lib/{Button-U1rsP4v8.js.map → Button-B36rBMKC.js.map} +1 -1
- package/dist/lib/{Card-BVwOS8AG.js → Card-P8iUH2-C.js} +2 -2
- package/dist/lib/{Card-BVwOS8AG.js.map → Card-P8iUH2-C.js.map} +1 -1
- package/dist/lib/{ComboBox-B9EDPu6T.js → ComboBox-BjAhXXkY.js} +2 -2
- package/dist/lib/{ComboBox-B9EDPu6T.js.map → ComboBox-BjAhXXkY.js.map} +1 -1
- package/dist/lib/Component-CHTzJxEf.js +2 -0
- package/dist/lib/Component-CHTzJxEf.js.map +1 -0
- package/dist/lib/Container-xUbHk6l_.js +2 -0
- package/dist/lib/{Container-D5H8VxJK.js.map → Container-xUbHk6l_.js.map} +1 -1
- package/dist/lib/DOM-BeR95tE8.js +2 -0
- package/dist/lib/DOM-BeR95tE8.js.map +1 -0
- package/dist/lib/{DragManager-CI4mZQFy.js → DragManager-T5Oljd0F.js} +2 -2
- package/dist/lib/{DragManager-CI4mZQFy.js.map → DragManager-T5Oljd0F.js.map} +1 -1
- package/dist/lib/{FieldDecorator-CJs9gwqH.js → FieldDecorator-BaTGfKiW.js} +2 -2
- package/dist/lib/{FieldDecorator-CJs9gwqH.js.map → FieldDecorator-BaTGfKiW.js.map} +1 -1
- package/dist/lib/{Fit-DjRsiwlg.js → Fit-E-EIZv1k.js} +2 -2
- package/dist/lib/{Fit-DjRsiwlg.js.map → Fit-E-EIZv1k.js.map} +1 -1
- package/dist/lib/{Glyph-KEf4nIv2.js → Glyph-CnNslL95.js} +2 -2
- package/dist/lib/{Glyph-KEf4nIv2.js.map → Glyph-CnNslL95.js.map} +1 -1
- package/dist/lib/{Grid-DdL9TVeJ.js → Grid-BXS2T8MT.js} +2 -2
- package/dist/lib/{Grid-DdL9TVeJ.js.map → Grid-BXS2T8MT.js.map} +1 -1
- package/dist/lib/{GridConstraints-DkLueyrf.js → GridConstraints-D_kbd-h2.js} +2 -2
- package/dist/lib/{GridConstraints-DkLueyrf.js.map → GridConstraints-D_kbd-h2.js.map} +1 -1
- package/dist/lib/HBox-Dm3xgsDE.js +2 -0
- package/dist/lib/{HBox-Ce0GTCJP.js.map → HBox-Dm3xgsDE.js.map} +1 -1
- package/dist/lib/{Header-BQIVpBte.js → Header-CqFc2OUx.js} +2 -2
- package/dist/lib/{Header-BQIVpBte.js.map → Header-CqFc2OUx.js.map} +1 -1
- package/dist/lib/{IconText-Bo4Qcnot.js → IconText-CTM2r0Tv.js} +2 -2
- package/dist/lib/{IconText-Bo4Qcnot.js.map → IconText-CTM2r0Tv.js.map} +1 -1
- package/dist/lib/{LayoutSerialization-BT66TY83.js → LayoutSerialization-D1OHmxSB.js} +2 -2
- package/dist/lib/{LayoutSerialization-BT66TY83.js.map → LayoutSerialization-D1OHmxSB.js.map} +1 -1
- package/dist/lib/LayoutSizes-CvMmMgHJ.js +2 -0
- package/dist/lib/LayoutSizes-CvMmMgHJ.js.map +1 -0
- package/dist/lib/List-DHeOPAK2.js +2 -0
- package/dist/lib/List-DHeOPAK2.js.map +1 -0
- package/dist/lib/MemoryStore-DT6iWWco.js +2 -0
- package/dist/lib/MemoryStore-DT6iWWco.js.map +1 -0
- package/dist/lib/{Menu-Dz4L7EKJ.js → Menu-B6ippw-p.js} +2 -2
- package/dist/lib/{Menu-Dz4L7EKJ.js.map → Menu-B6ippw-p.js.map} +1 -1
- package/dist/lib/{MenuButton-VJ5uC3c1.js → MenuButton-Bjm1OyB-.js} +2 -2
- package/dist/lib/{MenuButton-VJ5uC3c1.js.map → MenuButton-Bjm1OyB-.js.map} +1 -1
- package/dist/lib/{Panel-DzWdYwq1.js → Panel-D9lTLGqP.js} +2 -2
- package/dist/lib/{Panel-DzWdYwq1.js.map → Panel-D9lTLGqP.js.map} +1 -1
- package/dist/lib/Position-DRSlWn4Z.js +2 -0
- package/dist/lib/Position-DRSlWn4Z.js.map +1 -0
- package/dist/lib/{ProgressSpinner-zJKtGyNJ.js → ProgressSpinner-glv-29eK.js} +2 -2
- package/dist/lib/{ProgressSpinner-zJKtGyNJ.js.map → ProgressSpinner-glv-29eK.js.map} +1 -1
- package/dist/lib/{RadioButton-CYSSv4nV.js → RadioButton-R4S3c9WD.js} +2 -2
- package/dist/lib/{RadioButton-CYSSv4nV.js.map → RadioButton-R4S3c9WD.js.map} +1 -1
- package/dist/lib/{RovingTabIndex-BSZ31Vp5.js → RovingTabIndex-Dgt01LOE.js} +2 -2
- package/dist/lib/{RovingTabIndex-BSZ31Vp5.js.map → RovingTabIndex-Dgt01LOE.js.map} +1 -1
- package/dist/lib/{Scrollbar-BhtOjqkG.js → Scrollbar-CiVV3axj.js} +2 -2
- package/dist/lib/{Scrollbar-BhtOjqkG.js.map → Scrollbar-CiVV3axj.js.map} +1 -1
- package/dist/lib/{Slider-CdXm7E64.js → Slider-_JVvuQ8M.js} +2 -2
- package/dist/lib/{Slider-CdXm7E64.js.map → Slider-_JVvuQ8M.js.map} +1 -1
- package/dist/lib/{Spacer-D9NGW4QG.js → Spacer-B57i2-_G.js} +2 -2
- package/dist/lib/{Spacer-D9NGW4QG.js.map → Spacer-B57i2-_G.js.map} +1 -1
- package/dist/lib/{TabButton-CThevdY_.js → TabButton-DEypdlZf.js} +2 -2
- package/dist/lib/{TabButton-CThevdY_.js.map → TabButton-DEypdlZf.js.map} +1 -1
- package/dist/lib/Text-Bni4icFY.js +2 -0
- package/dist/lib/Text-Bni4icFY.js.map +1 -0
- package/dist/lib/{Tooltip-tkXDk5Bo.js → Tooltip-BUy6uFKN.js} +2 -2
- package/dist/lib/{Tooltip-tkXDk5Bo.js.map → Tooltip-BUy6uFKN.js.map} +1 -1
- package/dist/lib/VBox-Dr7Ge9M6.js +2 -0
- package/dist/lib/VBox-Dr7Ge9M6.js.map +1 -0
- package/dist/lib/{VirtualScroller-DwEEJE1_.js → VirtualScroller-BPy6KmSX.js} +2 -2
- package/dist/lib/{VirtualScroller-DwEEJE1_.js.map → VirtualScroller-BPy6KmSX.js.map} +1 -1
- package/dist/lib/component/button.es.js +1 -1
- package/dist/lib/component/chart.es.js +1 -1
- package/dist/lib/component/chart.es.js.map +1 -1
- package/dist/lib/component/container.es.js +1 -1
- package/dist/lib/component/diagram.es.js +1 -1
- package/dist/lib/component/diagram.es.js.map +1 -1
- package/dist/lib/component/display.es.js +1 -1
- package/dist/lib/component/editor.es.js +3 -3
- package/dist/lib/component/editor.es.js.map +1 -1
- package/dist/lib/component/input.es.js +1 -1
- package/dist/lib/component/input.es.js.map +1 -1
- package/dist/lib/component/list.es.js +1 -1
- package/dist/lib/component/menubar.es.js +1 -1
- package/dist/lib/component/table.es.js +2 -2
- package/dist/lib/component/table.es.js.map +1 -1
- package/dist/lib/component/tree.es.js +1 -1
- package/dist/lib/component/tree.es.js.map +1 -1
- package/dist/lib/core.es.js +1 -1
- package/dist/lib/core.es.js.map +1 -1
- package/dist/lib/data.es.js +1 -1
- package/dist/lib/data.es.js.map +1 -1
- package/dist/lib/glyphs/solid/index.es.js +1 -1
- package/dist/lib/layout.es.js +1 -1
- package/dist/lib/layout.es.js.map +1 -1
- package/dist/lib/overlay.es.js +1 -1
- package/dist/lib/overlay.es.js.map +1 -1
- package/dist/lib/primitive.es.js +1 -1
- package/dist/lib/router.es.js +1 -1
- package/dist/lib/router.es.js.map +1 -1
- package/dist/lib/{VirtualRowView-BxpHQ_u8.js → selectionsEqual-2PJrcimg.js} +2 -2
- package/dist/lib/{VirtualRowView-BxpHQ_u8.js.map → selectionsEqual-2PJrcimg.js.map} +1 -1
- package/dist/lib/types/component/diagram/DiagramEdgeLayer.d.ts +14 -1
- package/dist/lib/types/component/diagram/DiagramModel.d.ts +1 -0
- package/dist/lib/types/component/diagram/DiagramNode.d.ts +4 -0
- package/dist/lib/types/component/diagram/DiagramView.d.ts +76 -5
- package/dist/lib/types/component/diagram/ElkLayoutEngine.d.ts +14 -1
- package/dist/lib/types/component/diagram/index.d.ts +2 -2
- package/dist/lib/types/component/editor/CodeEditor.d.ts +3 -2
- package/dist/lib/types/component/input/Text.d.ts +3 -1
- package/dist/lib/types/component/shared/selectionsEqual.d.ts +1 -0
- package/dist/lib/types/component/table/Column.d.ts +2 -0
- package/dist/lib/types/component/table/ColumnConfig.d.ts +1 -0
- package/dist/lib/types/component/table/Header.d.ts +1 -0
- package/dist/lib/types/component/table/Table.d.ts +20 -0
- package/dist/lib/types/component/table/cell/Header.d.ts +1 -0
- package/dist/lib/types/component/table/index.d.ts +1 -1
- package/dist/lib/types/component/tree/Tree.d.ts +1 -0
- package/dist/lib/types/core/Aria.d.ts +0 -2
- package/dist/lib/types/core/Body.d.ts +1 -0
- package/dist/lib/types/core/ClassStyleRules.d.ts +17 -0
- package/dist/lib/types/core/Component.d.ts +10 -2
- package/dist/lib/types/core/ComponentDefaults.d.ts +1 -0
- package/dist/lib/types/core/DOM.d.ts +11 -2
- package/dist/lib/types/core/ElementAttributes.d.ts +15 -0
- package/dist/lib/types/core/PendingTransitions.d.ts +4 -0
- package/dist/lib/types/core/StyleTarget.d.ts +1 -0
- package/dist/lib/types/core/Util.d.ts +2 -0
- package/dist/lib/types/core/index.d.ts +1 -0
- package/dist/lib/types/layout/Border.d.ts +1 -0
- package/dist/lib/types/layout/Tab.d.ts +4 -1
- package/dist/lib/types/layout/Table.d.ts +1 -0
- package/dist/lib/types/overlay/AbstractWindow.d.ts +1 -0
- package/dist/lib/types/router/RoutePattern.d.ts +7 -0
- package/dist/lib/types/router/Router.d.ts +13 -2
- package/dist/lib/types/router/index.d.ts +1 -1
- package/dist/lib/validation.es.js +1 -1
- package/llms.txt +1 -1
- package/package.json +4 -8
- package/dist/lib/Border-BgaZkc1R.js +0 -2
- package/dist/lib/BoxLayout-DrKGfsup.js +0 -2
- package/dist/lib/BoxLayout-DrKGfsup.js.map +0 -1
- package/dist/lib/Component-DXf5a3g0.js +0 -2
- package/dist/lib/Component-DXf5a3g0.js.map +0 -1
- package/dist/lib/Container-D5H8VxJK.js +0 -2
- package/dist/lib/DOM-CGn7xyTw.js +0 -2
- package/dist/lib/DOM-CGn7xyTw.js.map +0 -1
- package/dist/lib/HBox-Ce0GTCJP.js +0 -2
- package/dist/lib/LayoutSizes-DU3qSq0w.js +0 -2
- package/dist/lib/LayoutSizes-DU3qSq0w.js.map +0 -1
- package/dist/lib/List-DtTVTyWW.js +0 -2
- package/dist/lib/List-DtTVTyWW.js.map +0 -1
- package/dist/lib/Position-A39T7-_1.js +0 -2
- package/dist/lib/Position-A39T7-_1.js.map +0 -1
- package/dist/lib/Text-gz6qjFfP.js +0 -2
- package/dist/lib/Text-gz6qjFfP.js.map +0 -1
- package/dist/lib/VBox-EIqw85Rh.js +0 -2
- package/dist/lib/VBox-EIqw85Rh.js.map +0 -1
|
@@ -10,6 +10,7 @@ import { ColumnSpec } from "../../component/table/ColumnConfig.js";
|
|
|
10
10
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
11
11
|
import { ExportOptions } from "../../component/table/TableExporter.js";
|
|
12
12
|
export type TableEvent = "selection" | "cellclick";
|
|
13
|
+
export type TableDisplayMode = "normal" | "rotated";
|
|
13
14
|
export interface TableOptions extends ComponentOptions {
|
|
14
15
|
}
|
|
15
16
|
declare class Table extends Component<TableOptions> {
|
|
@@ -32,6 +33,14 @@ declare class Table extends Component<TableOptions> {
|
|
|
32
33
|
private _columnConfigs;
|
|
33
34
|
private _exportMenuEnabled;
|
|
34
35
|
private _listeners;
|
|
36
|
+
private _displayMode;
|
|
37
|
+
private _rotatedRecord;
|
|
38
|
+
private _rotatedStore;
|
|
39
|
+
private _rotatedColumns;
|
|
40
|
+
private _rotatedConfigs;
|
|
41
|
+
private _rotatedFieldByName;
|
|
42
|
+
private _sourceRefresh;
|
|
43
|
+
private _suppressSelectionForward;
|
|
35
44
|
constructor(store: AbstractStore, spec?: ColumnSpec, bodyFactory?: (store: AbstractStore) => Body);
|
|
36
45
|
on(event: "selection", listener: (records: ModelRecord[]) => void): this;
|
|
37
46
|
on(event: "cellclick", listener: (e: CellClickEvent) => void): this;
|
|
@@ -39,6 +48,9 @@ declare class Table extends Component<TableOptions> {
|
|
|
39
48
|
protected emit(event: "selection", records: ModelRecord[]): void;
|
|
40
49
|
protected emit(event: "cellclick", detail: CellClickEvent): void;
|
|
41
50
|
getColumns(): Column[];
|
|
51
|
+
private getSourceColumns;
|
|
52
|
+
getDisplayMode(): TableDisplayMode;
|
|
53
|
+
setDisplayMode(mode: TableDisplayMode): this;
|
|
42
54
|
getStore(): AbstractStore;
|
|
43
55
|
getModel(): import("../../data").AbstractModel;
|
|
44
56
|
setStore(store: AbstractStore): this;
|
|
@@ -64,6 +76,14 @@ declare class Table extends Component<TableOptions> {
|
|
|
64
76
|
private buildColumnConfigs;
|
|
65
77
|
private initHiddenFromSpec;
|
|
66
78
|
private getEffectiveHiddenSet;
|
|
79
|
+
private bindSourceStore;
|
|
80
|
+
private unbindSourceStore;
|
|
81
|
+
private onSourceStoreChange;
|
|
82
|
+
private ensureRotatedStore;
|
|
83
|
+
private rebuildRotatedStore;
|
|
84
|
+
private rotatedCellType;
|
|
85
|
+
private rotatedCellValues;
|
|
86
|
+
private bindView;
|
|
67
87
|
private showColumnMenu;
|
|
68
88
|
setExportMenuEnabled(enabled: boolean): this;
|
|
69
89
|
exportCSV(options?: ExportOptions): void;
|
|
@@ -26,6 +26,7 @@ declare class HeaderCell extends DefaultCell {
|
|
|
26
26
|
} | null;
|
|
27
27
|
clearSortState(): this;
|
|
28
28
|
setRequired(value: boolean): this;
|
|
29
|
+
setHeaderText(text: String): this;
|
|
29
30
|
private _renderTitle;
|
|
30
31
|
on(event: "commit", listener: (value: String | null) => void): this;
|
|
31
32
|
on(event: "editend", listener: () => void): this;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Table } from '../../component/table/Table.js';
|
|
2
|
-
export type { TableOptions, TableEvent } from '../../component/table/Table.js';
|
|
2
|
+
export type { TableOptions, TableEvent, TableDisplayMode } from '../../component/table/Table.js';
|
|
3
3
|
export { TablePanel } from '../../component/table/TablePanel.js';
|
|
4
4
|
export { TreeTable } from '../../component/table/TreeTable.js';
|
|
5
5
|
export type { RowReparentDetail } from '../../component/table/TreeTable.js';
|
|
@@ -54,6 +54,7 @@ declare class Tree extends VirtualRowView<TreeRow, TreeOptions> {
|
|
|
54
54
|
private _reflattenAndRender;
|
|
55
55
|
private _onToggle;
|
|
56
56
|
private _loadAndExpand;
|
|
57
|
+
private _notifySelectionChange;
|
|
57
58
|
private _rangeSelect;
|
|
58
59
|
private _selectAtIndex;
|
|
59
60
|
private _extendSelectionTo;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Component } from "../core/Component.js";
|
|
2
|
-
import type { Handle } from "../core/DOM.js";
|
|
3
2
|
export type AriaRole = 'grid' | 'treegrid' | 'rowgroup' | 'row' | 'gridcell' | 'columnheader' | 'tablist' | 'tab' | 'tabpanel' | 'tree' | 'treeitem' | 'group' | 'button' | 'link' | 'region' | 'combobox' | 'listbox' | 'option' | 'menubar' | 'menuitem' | 'menu' | 'toolbar' | 'separator' | 'spinbutton' | 'progressbar' | 'status' | 'alert' | 'dialog' | 'checkbox' | 'radio' | 'slider' | 'switch';
|
|
4
3
|
export type AriaSort = 'none' | 'ascending' | 'descending';
|
|
5
4
|
export type AriaLive = 'off' | 'polite' | 'assertive';
|
|
@@ -70,6 +69,5 @@ export declare class Aria {
|
|
|
70
69
|
clearLabel(): this;
|
|
71
70
|
setOrientation(value: AriaOrientation): this;
|
|
72
71
|
getOrientation(): AriaOrientation | null;
|
|
73
|
-
applyToElement(element: Handle): void;
|
|
74
72
|
private setAttribute;
|
|
75
73
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const COMPONENT_CLASS = "ts-ui-component";
|
|
2
|
+
interface ClassStyleDefaults {
|
|
3
|
+
visible?: boolean | null;
|
|
4
|
+
displayed?: boolean;
|
|
5
|
+
minSize?: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
} | null;
|
|
9
|
+
maxSize?: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
} | null;
|
|
13
|
+
overflow?: string | null;
|
|
14
|
+
}
|
|
15
|
+
type ClassStyleBag = Readonly<Record<string, string>>;
|
|
16
|
+
export declare function ensureClassStyleRule(ctor: Function, defaults: ClassStyleDefaults): ClassStyleBag | null;
|
|
17
|
+
export {};
|
|
@@ -74,7 +74,6 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
74
74
|
private readonly _ownedSelectors;
|
|
75
75
|
private readonly _themeCleanups;
|
|
76
76
|
private _tag;
|
|
77
|
-
private _attributes;
|
|
78
77
|
private _elementAttributes;
|
|
79
78
|
private _boxSizing;
|
|
80
79
|
private _left;
|
|
@@ -108,6 +107,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
108
107
|
private _borderWidths;
|
|
109
108
|
private _borderThemeSubscribed;
|
|
110
109
|
private _autoCommitStyle;
|
|
110
|
+
private _autoCommitAttributes;
|
|
111
111
|
private _layoutPaused;
|
|
112
112
|
private _aria;
|
|
113
113
|
private _whiteSpace;
|
|
@@ -115,6 +115,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
115
115
|
private _verticalAlign;
|
|
116
116
|
private _styleRule;
|
|
117
117
|
private _inlineStyle;
|
|
118
|
+
private _inheritedStyleBag;
|
|
118
119
|
private _clipFrame;
|
|
119
120
|
private _clipFrameStyle;
|
|
120
121
|
private _contentFrame;
|
|
@@ -122,7 +123,8 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
122
123
|
private _deferredStyleRules;
|
|
123
124
|
private _parent;
|
|
124
125
|
protected _options: TOptions;
|
|
125
|
-
protected _defaultOptions: TOptions
|
|
126
|
+
protected _defaultOptions: Readonly<TOptions>;
|
|
127
|
+
private _defaultLayoutManager;
|
|
126
128
|
constructor(options?: TOptions, subclassDefaults?: Partial<TOptions>);
|
|
127
129
|
protected applyOptions(options: TOptions): this;
|
|
128
130
|
protected applyChromeOptions(options: TOptions): void;
|
|
@@ -158,6 +160,9 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
158
160
|
getAutoCommitStyle(): boolean;
|
|
159
161
|
setAutoCommitStyle(value: boolean): this;
|
|
160
162
|
protected commitElementStyle(): this;
|
|
163
|
+
getAutoCommitAttributes(): boolean;
|
|
164
|
+
setAutoCommitAttributes(value: boolean): this;
|
|
165
|
+
protected commitElementAttributes(): this;
|
|
161
166
|
protected setElementCSSRules(values: Style): this;
|
|
162
167
|
protected setElementCSSRule(key: string, value: Object | null): this;
|
|
163
168
|
protected commitCSSRule(): this;
|
|
@@ -326,6 +331,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
326
331
|
clearUserSelect(): this;
|
|
327
332
|
focus(preventScroll?: boolean): this;
|
|
328
333
|
unfocus(): this;
|
|
334
|
+
private writeRuleDeclaration;
|
|
329
335
|
applyStyle(element: Handle): this;
|
|
330
336
|
private applyBoxAndVisibilityStyles;
|
|
331
337
|
private replayGeometryStyles;
|
|
@@ -333,6 +339,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
333
339
|
private applyOverflowStyles;
|
|
334
340
|
private applyChromeStyles;
|
|
335
341
|
private applyMiscInlineStyles;
|
|
342
|
+
protected materialiseStyleRule(): void;
|
|
336
343
|
private materialiseDeferredRules;
|
|
337
344
|
sync(): void;
|
|
338
345
|
getParentComponent(): Component | null;
|
|
@@ -369,6 +376,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
369
376
|
addMouseDownSubtreeListener(listener: Event.Listener): this;
|
|
370
377
|
removeMouseDownSubtreeListener(listener: Event.Listener): this;
|
|
371
378
|
protected init(element?: Handle): this;
|
|
379
|
+
protected reattachElementBuffers(): this;
|
|
372
380
|
protected createRootElement(): Handle;
|
|
373
381
|
protected render(): Handle;
|
|
374
382
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveClassDefaults<TOptions>(ctor: Function, subclassDefaults: Partial<TOptions> | undefined): Readonly<TOptions>;
|
|
@@ -63,7 +63,7 @@ export interface DOMSink {
|
|
|
63
63
|
apply(handle: Handle, patch: ElementPatch): void;
|
|
64
64
|
edit(handle: Handle): PatchBuilder;
|
|
65
65
|
release(handle: Handle): void;
|
|
66
|
-
|
|
66
|
+
setRuleStyles(rule: CSSStyleRule, styles: Record<string, string | null>): void;
|
|
67
67
|
ensureStyleRule(selector: string): CSSStyleRule;
|
|
68
68
|
deleteStyleRule(selector: string): void;
|
|
69
69
|
ensureKeyframes(name: string, body: string): void;
|
|
@@ -81,6 +81,8 @@ export interface DOMSink {
|
|
|
81
81
|
setSelectionRange(handle: Handle, start: number, end: number): void;
|
|
82
82
|
setLocationHash(hash: string): void;
|
|
83
83
|
replaceLocationHash(hash: string): void;
|
|
84
|
+
pushHistoryPath(url: string): void;
|
|
85
|
+
replaceHistoryPath(url: string): void;
|
|
84
86
|
addListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | AddEventListenerOptions): void;
|
|
85
87
|
removeListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | EventListenerOptions): void;
|
|
86
88
|
dispatchEvent(target: Handle, event: Event): void;
|
|
@@ -137,6 +139,7 @@ export interface DOMSource {
|
|
|
137
139
|
isWindow(target: Handle | null): boolean;
|
|
138
140
|
getWindow(): Handle;
|
|
139
141
|
getLocationHash(): string;
|
|
142
|
+
getLocationPathname(): string;
|
|
140
143
|
contains(ancestor: Handle, node: Handle | null): boolean;
|
|
141
144
|
querySelector(root: Handle, selector: string): Handle | null;
|
|
142
145
|
querySelectorAll(root: Handle, selector: string): Handle[];
|
|
@@ -182,13 +185,16 @@ export interface MediaQueryResult {
|
|
|
182
185
|
}
|
|
183
186
|
export declare class ProductionDOMSink implements DOMSink {
|
|
184
187
|
private readonly _timers;
|
|
188
|
+
private _ruleIndex;
|
|
189
|
+
private _indexedSheet;
|
|
185
190
|
apply(handle: Handle, patch: ElementPatch): void;
|
|
186
191
|
edit(handle: Handle): PatchBuilder;
|
|
187
192
|
release(handle: Handle): void;
|
|
188
|
-
|
|
193
|
+
setRuleStyles(rule: CSSStyleRule, styles: Record<string, string | null>): void;
|
|
189
194
|
ensureStyleRule(selector: string): CSSStyleRule;
|
|
190
195
|
deleteStyleRule(selector: string): void;
|
|
191
196
|
ensureKeyframes(name: string, body: string): void;
|
|
197
|
+
private ruleIndex;
|
|
192
198
|
private mainSheet;
|
|
193
199
|
createElement(tag: string): Handle;
|
|
194
200
|
createElementNS(ns: string, tag: string): Handle;
|
|
@@ -204,6 +210,8 @@ export declare class ProductionDOMSink implements DOMSink {
|
|
|
204
210
|
setSelectionRange(handle: Handle, start: number, end: number): void;
|
|
205
211
|
setLocationHash(hash: string): void;
|
|
206
212
|
replaceLocationHash(hash: string): void;
|
|
213
|
+
pushHistoryPath(url: string): void;
|
|
214
|
+
replaceHistoryPath(url: string): void;
|
|
207
215
|
addListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | AddEventListenerOptions): void;
|
|
208
216
|
removeListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | EventListenerOptions): void;
|
|
209
217
|
dispatchEvent(target: Handle, event: Event): void;
|
|
@@ -260,6 +268,7 @@ export declare class ProductionDOMSource implements DOMSource {
|
|
|
260
268
|
isWindow(target: Handle | null): boolean;
|
|
261
269
|
getWindow(): Handle;
|
|
262
270
|
getLocationHash(): string;
|
|
271
|
+
getLocationPathname(): string;
|
|
263
272
|
contains(ancestor: Handle, node: Handle | null): boolean;
|
|
264
273
|
querySelector(root: Handle, selector: string): Handle | null;
|
|
265
274
|
querySelectorAll(root: Handle, selector: string): Handle[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Handle } from "../core/DOM.js";
|
|
2
|
+
declare class ElementAttributes {
|
|
3
|
+
private _handle;
|
|
4
|
+
private _state;
|
|
5
|
+
private _pending;
|
|
6
|
+
set(key: string, value: string): void;
|
|
7
|
+
remove(key: string): void;
|
|
8
|
+
queue(key: string, value: string): void;
|
|
9
|
+
queueRemove(key: string): void;
|
|
10
|
+
get(key: string): string | undefined;
|
|
11
|
+
flush(): void;
|
|
12
|
+
attach(handle: Handle): void;
|
|
13
|
+
isMaterialized(): boolean;
|
|
14
|
+
}
|
|
15
|
+
export { ElementAttributes };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Handle } from "../core/DOM.js";
|
|
2
|
+
export declare function registerTransition(handle: Handle, cancel: () => void): void;
|
|
3
|
+
export declare function unregisterTransition(handle: Handle, cancel: () => void): void;
|
|
4
|
+
export declare function cancelTransitions(handle: Handle): void;
|
|
@@ -8,6 +8,7 @@ declare abstract class StyleTarget<T> {
|
|
|
8
8
|
queueMany(values: Record<string, string | null>): void;
|
|
9
9
|
flush(): void;
|
|
10
10
|
isMaterialized(): boolean;
|
|
11
|
+
hasQueuedWrites(): boolean;
|
|
11
12
|
protected materialize(target: T): void;
|
|
12
13
|
protected abstract writeStyle(key: string, value: string | null): void;
|
|
13
14
|
protected abstract flushDirty(dirty: Record<string, string | null>): void;
|
|
@@ -28,6 +28,8 @@ export declare namespace Util {
|
|
|
28
28
|
bottom: number;
|
|
29
29
|
}): number;
|
|
30
30
|
function opticalCenterOffset(): number;
|
|
31
|
+
function textMetricsGeneration(): number;
|
|
32
|
+
function boundFontSizePx(cssVar: string, cssRule: string | null): number | null;
|
|
31
33
|
function invalidateTextMetricsCache(): void;
|
|
32
34
|
function generateUUID(): string;
|
|
33
35
|
function isInteger(value: Object): boolean;
|
|
@@ -34,6 +34,7 @@ export { ThemeManager, BaseTheme, ClassicTheme, DarkTheme, ModernTheme, defineTh
|
|
|
34
34
|
export type { Theme, DeepPartial, ScaleToken, ResolvedScale, FontSizeToken } from '../core/Theme.js';
|
|
35
35
|
export { StyleTarget, StyleRule, InlineStyle } from '../core/StyleTarget.js';
|
|
36
36
|
export type { StyleRuleScope, StyleRuleSpec } from '../core/StyleTarget.js';
|
|
37
|
+
export { ElementAttributes } from '../core/ElementAttributes.js';
|
|
37
38
|
export { Binding } from '../core/Binding.js';
|
|
38
39
|
export type { BeforeRecordListener, BindingEvent } from '../core/Binding.js';
|
|
39
40
|
export type { Bindable, BindingAccessors } from '../core/Bindable.js';
|
|
@@ -32,6 +32,7 @@ declare class Border extends LayoutManager {
|
|
|
32
32
|
setRegionCollapsible(placement: Placement, value: boolean): this;
|
|
33
33
|
private ensureGutter;
|
|
34
34
|
private regionExtent;
|
|
35
|
+
private flooredMainExtent;
|
|
35
36
|
private applyRegionClip;
|
|
36
37
|
private updateRegionGutter;
|
|
37
38
|
private innerEdgeTrack;
|
|
@@ -6,7 +6,7 @@ import type { ComponentFactory } from "../core/Component.js";
|
|
|
6
6
|
import { AbstractWindow } from "../overlay/AbstractWindow.js";
|
|
7
7
|
import type { TabToolDescriptor } from "../component/container/TabBar.js";
|
|
8
8
|
import type { AxisPosition, AxisEnd } from "../primitive/Axis.js";
|
|
9
|
-
export type TabEvent = "tabclose" | "empty" | "detach" | "activate" | "dock" | "exception";
|
|
9
|
+
export type TabEvent = "tabclose" | "empty" | "detach" | "select" | "activate" | "dock" | "exception";
|
|
10
10
|
export type TabDetachWindowMode = "bare" | "strip";
|
|
11
11
|
export type TabWidthMode = "fill" | "content" | "equal" | "fixed";
|
|
12
12
|
export type TabSide = "north" | "south" | "west" | "east";
|
|
@@ -109,6 +109,7 @@ declare class Tab extends LayoutManager {
|
|
|
109
109
|
addLazyTab(factory: ComponentFactory, name: string, constraints?: LayoutConstraints): void;
|
|
110
110
|
private syncUntabbedChildren;
|
|
111
111
|
private materializeAsync;
|
|
112
|
+
private announcePendingActivation;
|
|
112
113
|
private failEntry;
|
|
113
114
|
protected computeTotalMinSize(): Size;
|
|
114
115
|
doLayout(): void;
|
|
@@ -130,6 +131,7 @@ declare class Tab extends LayoutManager {
|
|
|
130
131
|
on(event: "tabclose", listener: (component: Component) => void): this;
|
|
131
132
|
on(event: "empty", listener: () => void): this;
|
|
132
133
|
on(event: "detach", listener: (window: AbstractWindow) => void): this;
|
|
134
|
+
on(event: "select", listener: (index: number, label: string) => void): this;
|
|
133
135
|
on(event: "activate", listener: (content: Component, index: number) => void): this;
|
|
134
136
|
on(event: "dock", listener: (content: Component) => void): this;
|
|
135
137
|
on(event: "exception", listener: (error: unknown, label: string) => void): this;
|
|
@@ -137,6 +139,7 @@ declare class Tab extends LayoutManager {
|
|
|
137
139
|
protected emit(event: "tabclose", component: Component): void;
|
|
138
140
|
protected emit(event: "empty"): void;
|
|
139
141
|
protected emit(event: "detach", window: AbstractWindow): void;
|
|
142
|
+
protected emit(event: "select", index: number, label: string): void;
|
|
140
143
|
protected emit(event: "activate", content: Component, index: number): void;
|
|
141
144
|
protected emit(event: "dock", content: Component): void;
|
|
142
145
|
protected emit(event: "exception", error: unknown, label: string): void;
|
|
@@ -90,6 +90,7 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
|
|
|
90
90
|
private readonly _boundOnSnapBlur;
|
|
91
91
|
private readonly _boundOnBorderResize;
|
|
92
92
|
private readonly _boundOnBringToFront;
|
|
93
|
+
private readonly _boundOnThemeReflow;
|
|
93
94
|
constructor(options?: WindowOptions);
|
|
94
95
|
protected initChrome(options?: WindowOptions): void;
|
|
95
96
|
protected applyOptions(options: WindowOptions): this;
|
|
@@ -10,6 +10,13 @@ export interface CompiledPattern {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function normalizePath(input: string): string;
|
|
12
12
|
export declare function splitPath(path: string): string[];
|
|
13
|
+
export declare function splitFragment(input: string): {
|
|
14
|
+
path: string;
|
|
15
|
+
fragment: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function normalizeBase(base: string): string;
|
|
18
|
+
export declare function stripBase(base: string, pathname: string): string;
|
|
19
|
+
export declare function joinBase(base: string, path: string): string;
|
|
13
20
|
export declare function compilePattern(pattern: string): CompiledPattern;
|
|
14
21
|
export declare function matchPattern(compiled: CompiledPattern, segments: string[]): Record<string, string> | null;
|
|
15
22
|
export declare function selectPattern<T extends CompiledPattern>(compiled: readonly T[], path: string): {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
export type RouteParams = Record<string, string>;
|
|
2
|
-
export type RouteHandler = (params: RouteParams, path: string) => void;
|
|
2
|
+
export type RouteHandler = (params: RouteParams, path: string, fragment: string) => void;
|
|
3
3
|
export type RouterEvent = "navigate" | "nomatch";
|
|
4
|
+
export type RouterMode = "hash" | "history";
|
|
4
5
|
export interface RouteMatch {
|
|
5
6
|
pattern: string;
|
|
6
7
|
params: RouteParams;
|
|
7
8
|
path: string;
|
|
9
|
+
fragment: string;
|
|
8
10
|
}
|
|
9
11
|
export interface RouterOptions {
|
|
12
|
+
mode?: RouterMode;
|
|
13
|
+
base?: string;
|
|
10
14
|
routes?: Record<string, RouteHandler>;
|
|
11
15
|
listeners?: Partial<{
|
|
12
16
|
navigate: (match: RouteMatch) => void;
|
|
@@ -17,7 +21,10 @@ export declare class Router {
|
|
|
17
21
|
private _routes;
|
|
18
22
|
private _listeners;
|
|
19
23
|
private _started;
|
|
24
|
+
private _mode;
|
|
25
|
+
private _base;
|
|
20
26
|
private readonly _onHashChange;
|
|
27
|
+
private readonly _onPopState;
|
|
21
28
|
constructor(options?: RouterOptions);
|
|
22
29
|
register(pattern: string, handler: RouteHandler): this;
|
|
23
30
|
start(): this;
|
|
@@ -25,7 +32,10 @@ export declare class Router {
|
|
|
25
32
|
navigate(path: string, options?: {
|
|
26
33
|
replace?: boolean;
|
|
27
34
|
}): this;
|
|
28
|
-
|
|
35
|
+
getHref(path: string): string;
|
|
36
|
+
getPath(href?: string): string;
|
|
37
|
+
getFragment(href?: string): string;
|
|
38
|
+
private decodePath;
|
|
29
39
|
on(event: "navigate", listener: (match: RouteMatch) => void): this;
|
|
30
40
|
on(event: "nomatch", listener: (path: string) => void): this;
|
|
31
41
|
off(event: RouterEvent, listener: Function): this;
|
|
@@ -33,4 +43,5 @@ export declare class Router {
|
|
|
33
43
|
private applyCurrentRoute;
|
|
34
44
|
protected applyOptions(options: RouterOptions): void;
|
|
35
45
|
private handleHashChange;
|
|
46
|
+
private handlePopState;
|
|
36
47
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Router } from '../router/Router.js';
|
|
2
|
-
export type { RouteParams, RouteHandler, RouterEvent, RouteMatch, RouterOptions } from '../router/Router.js';
|
|
2
|
+
export type { RouteParams, RouteHandler, RouterEvent, RouteMatch, RouterOptions, RouterMode } from '../router/Router.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./FieldDecorator-
|
|
1
|
+
import{t as e}from"./FieldDecorator-BaTGfKiW.js";export{e as FieldDecorator};
|
package/llms.txt
CHANGED
|
@@ -100,7 +100,7 @@ Organized by task. Columns: task → symbol · import subpath · summary · docs
|
|
|
100
100
|
- Relate models (has-many / belongs-to) → **Association** · `@jimka/typescript-ui/data` · Declarative association descriptor; behaviour lives in AbstractModel / ModelRecord / AbstractStore. · docs/data/associations.md
|
|
101
101
|
|
|
102
102
|
### App shell
|
|
103
|
-
- Map the URL
|
|
103
|
+
- Map the URL to a top-level app section → **Router** · `@jimka/typescript-ui/router` · Maps the URL hash or path to a single top-level app section. Patterns are registered with register (e.g. `"/data/rows/:sel"`); on a navigat… · docs/concepts/routing.md
|
|
104
104
|
|
|
105
105
|
## Conventions (hard rules)
|
|
106
106
|
1. Never use CSS flex/grid or `position: relative` — arrange children with a LayoutManager (HBox/VBox/Border/Grid/Split/…). → docs/concepts/layout-system.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimka/typescript-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A web-based layout manager and UI component framework written in TypeScript.",
|
|
5
5
|
"keywords": ["ui", "ui-components", "typescript", "layout", "layout-manager", "widgets", "framework", "dock", "data-table", "retained-mode"],
|
|
6
6
|
"author": "Jimmy Karlsson",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"scripts": {
|
|
128
128
|
"dev": "vite",
|
|
129
129
|
"build": "npm run typecheck && vite build",
|
|
130
|
-
"build:lib": "tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json && vite build --config vite.lib.config.ts",
|
|
130
|
+
"build:lib": "rimraf dist/lib && tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json && vite build --config vite.lib.config.ts",
|
|
131
131
|
"prepublishOnly": "npm run build:lib",
|
|
132
132
|
"preview": "vite preview",
|
|
133
133
|
"typecheck": "tsc -p tsconfig.lib.json --noEmit",
|
|
@@ -135,9 +135,6 @@
|
|
|
135
135
|
"doc": "typedoc --out dist/docs src/typescript",
|
|
136
136
|
"docs:api": "typedoc",
|
|
137
137
|
"docs:llms": "node scripts/llms/generate.mjs",
|
|
138
|
-
"docs:dev": "vitepress dev docs",
|
|
139
|
-
"docs:build": "npm run docs:api && npm run docs:llms && NODE_OPTIONS=--max-old-space-size=12288 vitepress build docs",
|
|
140
|
-
"docs:preview": "vitepress preview docs",
|
|
141
138
|
"clean": "rimraf dist/*",
|
|
142
139
|
"lint": "eslint src",
|
|
143
140
|
"lint:fix": "eslint src --fix",
|
|
@@ -157,7 +154,7 @@
|
|
|
157
154
|
"@vitest/coverage-v8": "^4.1.9",
|
|
158
155
|
"cloc": "^2.6.0-cloc",
|
|
159
156
|
"concurrently": "^6.3.0",
|
|
160
|
-
"elkjs": "^0.
|
|
157
|
+
"elkjs": "^0.12.0",
|
|
161
158
|
"eslint": "^9.0.0",
|
|
162
159
|
"google-closure-compiler": "^20200406.0.0",
|
|
163
160
|
"jsdom": "^29.1.1",
|
|
@@ -171,7 +168,6 @@
|
|
|
171
168
|
"typescript": "^6.0.3",
|
|
172
169
|
"typescript-eslint": "^8.0.0",
|
|
173
170
|
"vite": "^8.0.16",
|
|
174
|
-
"vitepress": "^1.5.0",
|
|
175
171
|
"vitest": "^4.1.9"
|
|
176
172
|
},
|
|
177
173
|
"dependencies": {
|
|
@@ -205,7 +201,7 @@
|
|
|
205
201
|
"sql-formatter": "^15.8.2"
|
|
206
202
|
},
|
|
207
203
|
"peerDependencies": {
|
|
208
|
-
"elkjs": "^0.
|
|
204
|
+
"elkjs": "^0.12.0"
|
|
209
205
|
},
|
|
210
206
|
"peerDependenciesMeta": {
|
|
211
207
|
"elkjs": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./DOM-CGn7xyTw.js";import{a as t,s as n}from"./Position-A39T7-_1.js";import{_ as r,d as i,f as a,h as o,l as s,t as c,y as l}from"./Component-DXf5a3g0.js";import{t as u}from"./ListenerBag-WPdKuuds.js";import{t as d}from"./Tooltip-tkXDk5Bo.js";import{t as f}from"./Placement-7kqdaK4Z.js";import{t as p}from"./LayoutConstraints-DkctJZXB.js";function beginPointerDrag(t){e.sink.apply(e.source.getBody(),{style:{pointerEvents:`none`}}),e.sink.apply(e.source.getDocumentElement(),{style:{cursor:t}})}function endPointerDrag(){e.sink.apply(e.source.getBody(),{style:{pointerEvents:``}}),e.sink.apply(e.source.getDocumentElement(),{style:{cursor:``}})}var m=200,h=`cubic-bezier(0.4, 0, 0.6, 1)`,g={cancel:()=>{}};function track(e,t){let n=null,r=!1,prune=()=>{r=!0;let t=n===null?-1:e.indexOf(n);t>=0&&e.splice(t,1)},{handle:i,cleanup:a}=t(prune);r||(n={cancel:()=>i.cancel(),settle:()=>{i.cancel(),a()}},e.push(n))}function primeCollapse(e,t,n,r,i){let cleanup=()=>{for(let e of n)e.setTransition(null);e.setWillChange(null)};if(o.isReducedMotion())return r(),{handle:g,cleanup};let a=t.map(e=>`${e} ${m}ms ${h}`).join(`, `);for(let e of n)e.setTransition(a);return e.setWillChange(t.join(`, `)),{handle:o.afterTransition({component:e,property:i??t[0],durationMs:m,fallbackBufferMs:40,onComplete:()=>{cleanup(),r()}}),cleanup}}function captureRect(e){return{x:e.getX(),y:e.getY(),width:e.getWidth(),height:e.getHeight()}}function parseCubicBezier(e){let t=e.match(/cubic-bezier\(([^)]+)\)/);if(!t)return e=>e;let[n,r,i,a]=t[1].split(`,`).map(e=>parseFloat(e)),o=3*n,s=3*(i-n)-o,c=1-o-s,l=3*r,u=3*(a-r)-l,d=1-l-u,sampleX=e=>((c*e+s)*e+o)*e,sampleY=e=>((d*e+u)*e+l)*e,sampleDX=e=>(3*c*e+2*s)*e+o;return e=>{let t=e;for(let n=0;n<8;n+=1){let n=sampleX(t)-e;if(Math.abs(n)<1e-6)return sampleY(t);let r=sampleDX(t);if(Math.abs(r)<1e-6)break;t-=n/r}let n=0,r=1;for(t=e;n<r;){let i=sampleX(t);if(Math.abs(i-e)<1e-6)break;i<e?n=t:r=t,t=(n+r)/2}return sampleY(t)}}var _=parseCubicBezier(h),lerp=(e,t,n)=>e+(t-e)*n,lerpRect=(e,t,n)=>({x:lerp(e.x,t.x,n),y:lerp(e.y,t.y,n),width:lerp(e.width,t.width,n),height:lerp(e.height,t.height,n)});function commitRect(e,t,n){e.setAutoCommitStyle(!1),e.setX(t.x),e.setY(t.y),e.setWidth(t.width),e.setHeight(t.height),n&&e.doLayout(),e.setAutoCommitStyle(!0)}function animateLayout(t,n){if(o.isReducedMotion()){for(let e of t)commitRect(e.component,e.end,e.relayout);return n?.(),()=>{}}let r=!1,i=0;for(let e of t)commitRect(e.component,e.start,e.relayout);let a=performance.now(),frame=o=>{if(r)return;let s=Math.min(1,(o-a)/m),c=_(s);for(let e of t)commitRect(e.component,s>=1?e.end:lerpRect(e.start,e.end,c),e.relayout);s<1?i=e.sink.requestAnimationFrame(frame):n?.()};return i=e.sink.requestAnimationFrame(frame),()=>{r=!0,i&&e.sink.cancelAnimationFrame(i)}}function runCollapse(e,t,n,r,i,a){r?.(),track(i,e=>primeCollapse(t,[`clip-path`],[t],e,`clip-path`));let o=n.filter(e=>!e.relayout).map(e=>e.component);o.length>0&&track(i,e=>primeCollapse(o[0],[`background-color`],o,e,`background-color`));let s=n.map(e=>captureRect(e.component));return e.doLayout(),animateLayout(n.map((e,t)=>({component:e.component,relayout:e.relayout,start:s[t],end:captureRect(e.component)})),a)}var v=10,y=40,b={east:0,south:90,west:180,north:-90},x=null;function ensureCollapseButtonClassRule(){x||=new r({scope:`class`,name:`CollapseButton`,styles:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,boxSizing:`border-box`,width:`${v}px`,height:`${y}px`,borderRadius:`2px`,background:`var(--ts-ui-button-bg, #e8e8e8)`,border:`1px solid var(--ts-ui-button-border, #c8c8c8)`,boxShadow:`var(--ts-ui-button-shadow, 0 1px 2px rgba(0, 0, 0, 0.2))`,textAlign:`center`,fontSize:`9px`,lineHeight:`${y-2}px`,color:`var(--ts-ui-collapse-button-color, rgb(100,100,100))`,pointerEvents:`auto`,userSelect:`none`}})}var CollapseButton=class extends c{_listeners=new u;constructor(e){ensureCollapseButtonClassRule(),super({tag:`span`,cursor:`pointer`,...e??{}}),this._direction??=`east`,this.applyRotation(),this.applyListeners(e?.listeners),l.addListener(this,`dblclick`,this.onDoubleClick),l.addListener(this,`mousedown`,this.onMouseDown)}applyOptions(e){return super.applyOptions(e),e.direction!==void 0&&this.setDirection(e.direction),this}render(){let t=super.render();return e.sink.apply(t,{text:`▶`}),t}applyRotation(){let e=b[this._direction];this.createStyleRule(``).set(`transform`,`translate(-50%, -50%) rotate(${e}deg)`)}setStripMode(e){return this.createStyleRule(``).set(`width`,`${e?18:v}px`),this}getDirection(){return this._direction}setDirection(e){return this._direction=e,this.applyRotation(),this}on(e,t){return this._listeners.add(e,t),this}off(e,t){return this._listeners.remove(e,t),this}emit(e){this._listeners.fire(e)}onDoubleClick(e){return this.emit(`collapse`),!0}onMouseDown(e){return!0}destroy(){l.removeListener(this,`dblclick`,this.onDoubleClick),l.removeListener(this,`mousedown`,this.onMouseDown)}},S=a(CollapseButton),C={west:`east`,east:`west`,north:`south`,south:`north`},w={orientation:`horizontal`,collapsible:!0,movable:!0},SplitGutter=class extends c{_opaque=!1;_collapseDirection=`west`;_expandedBackground=`var(--ts-ui-gutter-bg, #AAAAAA)`;_tooltipText=``;_listeners=new u;constructor(e,t){super(t,w),e&&t?.orientation===void 0&&(this._direction=e),this._expandedBackground=t?.expandedBackground??`var(--ts-ui-gutter-bg, #AAAAAA)`,this.setBackgroundColor(this._expandedBackground),this._collapseDirection=t?.collapseDirection??(this._direction===`horizontal`?`west`:`north`),this._collapseButton=new S({direction:this._collapseDirection,listeners:{collapse:()=>this.emit(`collapse`)}}),this._collapseButton.setVisible(this._collapsible),t?.opaque&&this.setOpaque(!0),this._movable||this.setPointerEvents(`none`),this._movable&&l.addListener(this,`mousedown`,this.onDragStart),this.applyListeners(t?.listeners),this.updateTooltip()}init(t){super.init(t);let n=t||this.getElement();return n&&e.sink.appendChild(n,this._collapseButton.getElement(!0)),this}isCollapsible(){return this._collapsible??this._defaultOptions.collapsible}setCollapsible(e){return this._collapsible=e,this._collapseButton?.setVisible(e),this._collapseButton&&this.updateTooltip(),this}applyOptions(e){return super.applyOptions(e),this.setDirection(e.orientation??this.getDirection()),this.setCollapsible(e.collapsible??this.isCollapsible()),this.setMovable(e.movable??this.isMovable()),this}isMovable(){return this._movable??this._defaultOptions.movable}setMovable(e){return this._movable=e,this}isOpaque(){return this._opaque}setOpaque(e){return this._opaque=e,e?(this.setBackgroundColor(`var(--ts-ui-button-bg, #e8e8e8)`),this.setBackgroundImage(`var(--ts-ui-button-bg, linear-gradient(rgb(241, 241, 241), rgb(200, 200, 200)))`),this.setBorder(`1px solid var(--ts-ui-button-border, #c8c8c8)`),this._collapseButton?.setDirection(C[this._collapseDirection])):(this.clearBackgroundImage(),this.clearBorder(),this.setBackgroundColor(this._expandedBackground),this._collapseButton?.setDirection(this._collapseDirection)),this._collapseButton?.setStripMode(e),this.applyCursor(),this.updateTooltip(),this}getCollapseDirection(){return this._collapseDirection}setCollapseDirection(e){return this._collapseDirection=e,this._collapseButton?.setDirection(this._opaque?C[e]:e),this.updateTooltip(),this}updateTooltip(){if(!this._collapsible){this._tooltipText!==``&&(d.detach(this),this._collapseButton&&d.detach(this._collapseButton),this._tooltipText=``);return}let e=`Double-click to ${this._opaque?`expand`:`collapse`} ${this._opaque?C[this._collapseDirection]:this._collapseDirection}ward`;e!==this._tooltipText&&(this._tooltipText=e,d.attach(this,e),this._collapseButton&&d.attach(this._collapseButton,e))}getDirection(){return this._direction??this._defaultOptions.orientation}setDirection(e){return e||=`horizontal`,this._direction=e,this}on(e,t){return this._listeners.add(e,t),this}off(e,t){return this._listeners.remove(e,t),this}emit(e,...t){this._listeners.fire(e,...t)}destroy(){l.removeListener(this,`mousedown`,this.onDragStart),this._collapseButton?.destroy()}_dispatchDrag(e){this.emit(`drag`,e)}onDragStart(e){if(this._opaque)return;let t=this._direction===`horizontal`?e.clientX:e.clientY;this.emit(`dragstart`,t),l.addViewportListener(this,`mouseup`,this.onDragStop),l.addViewportListener(this,`touchend`,this.onDragStop),l.addViewportListener(this,`touchcancel`,this.onDragStop),l.addViewportListener(this,`mousemove`,this.onDrag),l.addViewportListener(this,`touchmove`,this.onDrag),beginPointerDrag(this.dragCursor())}onDragStop(){return l.removeViewportListener(this,`mouseup`,this.onDragStop),l.removeViewportListener(this,`touchend`,this.onDragStop),l.removeViewportListener(this,`touchcancel`,this.onDragStop),l.removeViewportListener(this,`mousemove`,this.onDrag),l.removeViewportListener(this,`touchmove`,this.onDrag),endPointerDrag(),this.emit(`dragend`),!0}onDrag(e){let t;return t=this._direction===`horizontal`?e.clientX:e.clientY,this._dispatchDrag(t),!0}dragCursor(){return this._direction==`horizontal`?`ew-resize`:`ns-resize`}applyCursor(){this._movable&&!this._opaque?this.setCursor(this.dragCursor()):this.setCursor(`default`)}render(){let e=super.render();return this.applyCursor(),e}},T=a(SplitGutter),E=4,D={[f.NORTH]:`north`,[f.SOUTH]:`south`,[f.WEST]:`west`,[f.EAST]:`east`},Border=class extends s{_northComponent=null;_southComponent=null;_westComponent=null;_eastComponent=null;_centerComponent=null;_spacing=5;_collapsed=new Map;_collapsible=new Map;_gutters=new Map;_collapseAnimation=null;_pendingCollapseTransitions=[];_collapsing=!1;constructor(e){super(),e&&this.applyOptions(e)}applyOptions(e){super.applyOptions(e),e.spacing!==void 0&&this.setComponentSpacing(e.spacing)}setLayoutConstraints(e,t){switch(t||(t=new p,t.placement=f.CENTER),t.placement||=f.CENTER,t.placement){case f.NORTH:this._northComponent=e;break;case f.SOUTH:this._southComponent=e;break;case f.WEST:this._westComponent=e;break;case f.EAST:this._eastComponent=e;break;case f.CENTER:this._centerComponent=e;break}return t.placement===f.CENTER?this._collapsible.set(f.CENTER,!1):this._collapsible.set(t.placement,t.collapsible??!1),super.setLayoutConstraints(e,t)}delLayoutConstraints(e){return this._northComponent===e?this._northComponent=null:this._southComponent===e?this._southComponent=null:this._westComponent===e?this._westComponent=null:this._eastComponent===e?this._eastComponent=null:this._centerComponent===e&&(this._centerComponent=null),super.delLayoutConstraints(e)}getComponentSpacing(){return this._spacing}setComponentSpacing(e){return this._spacing=e,this}getRegionComponent(e){switch(e){case f.NORTH:return this._northComponent;case f.SOUTH:return this._southComponent;case f.WEST:return this._westComponent;case f.EAST:return this._eastComponent;case f.CENTER:return this._centerComponent}}isRegionCollapsed(e){return this._collapsed.get(e)??!1}setRegionCollapsed(e,t){if(e===f.CENTER||!this.isRegionCollapsible(e))return this;let n=this.getRegionComponent(e);if(!n||(this._collapsed.get(e)??!1)===t)return this;let r=this.getContainer();if(!r)return this;let i=this._collapsing;this._collapsing=!0,i||r.doLayout(),this._collapsed.set(e,t),this.ensureGutter(e);let a=[...[this._northComponent,this._southComponent,this._westComponent,this._eastComponent,this._centerComponent].filter(e=>e!=null).map(e=>({component:e,relayout:!0})),...[...this._gutters.values()].map(e=>({component:e,relayout:!1}))];return this._collapseAnimation=runCollapse(r,n,a,this._collapseAnimation,this._pendingCollapseTransitions,()=>{this._collapseAnimation=null,this._collapsing=!1,r.doLayout()}),this}isRegionCollapsible(e){return e===f.CENTER?!1:this._collapsible.get(e)??!1}setRegionCollapsible(e,t){return e===f.CENTER?this:(this._collapsible.set(e,t),this.getContainer()?.scheduleLayout(),this)}ensureGutter(t){let n=this._gutters.get(t);if(n)return n;let r=this.getContainer();return n=new T(t===f.NORTH||t===f.SOUTH?`vertical`:`horizontal`,{movable:!1,opaque:!1,collapseDirection:D[t],expandedBackground:`transparent`,listeners:{collapse:()=>this.setRegionCollapsed(t,!this.isRegionCollapsed(t))}}),n.setVisible(!1),e.sink.appendChild(r.getElement(),n.getElement(!0)),this._gutters.set(t,n),n}regionExtent(e,t){return this.isRegionCollapsed(e)?18:t}applyRegionClip(e,t){if(this.isRegionCollapsible(t)){if(!this.isRegionCollapsed(t)){e.setClipPath(`inset(0 0 0 0)`);return}switch(t){case f.WEST:e.setClipPath(`inset(0 100% 0 0)`);break;case f.EAST:e.setClipPath(`inset(0 0 0 100%)`);break;case f.NORTH:e.setClipPath(`inset(0 0 100% 0)`);break;case f.SOUTH:e.setClipPath(`inset(100% 0 0 0)`);break}}}updateRegionGutter(e,t,n,r,i){let a=this.getRegionComponent(e);if(!a)return;if(!this.isRegionCollapsible(e)){a.setVisible(!0),this._gutters.get(e)?.setVisible(!1);return}let o=this.isRegionCollapsed(e),s=this.ensureGutter(e);a.setVisible(!0),s.setOpaque(o),s.setVisible(!0);let c=o?{x:t,y:n,width:r,height:i}:this.innerEdgeTrack(e,t,n,r,i);s.setX(c.x),s.setY(c.y),s.setWidth(c.width),s.setHeight(c.height)}innerEdgeTrack(e,t,n,r,i){switch(e){case f.NORTH:return{x:t,y:n+i,width:r,height:E};case f.SOUTH:return{x:t,y:n-E,width:r,height:E};case f.WEST:return{x:t+r,y:n,width:E,height:i};case f.EAST:return{x:t-E,y:n,width:E,height:i};default:return{x:t,y:n,width:r,height:i}}}laidOut(e){return e&&e.isDisplayed()?e:null}getPreferredSize(){let e=this.getContainer();if(!e)return null;let t=e.getPerimeterSize(),n=t.left+t.right,r=t.top+t.bottom,i=0,a=0,o=0,s=0,c=this.laidOut(this._northComponent),l=this.laidOut(this._southComponent),u=this.laidOut(this._westComponent),d=this.laidOut(this._centerComponent),p=this.laidOut(this._eastComponent);if(c){let e=c.getPreferredSize();e&&(i=Math.max(i,e.width),a+=this.isRegionCollapsed(f.NORTH)?18:e.height)}if(l){let e=l.getPreferredSize();e&&(i=Math.max(i,e.width),a+=this.isRegionCollapsed(f.SOUTH)?18:e.height)}if(u){let e=u.getPreferredSize();e&&(o+=this.isRegionCollapsed(f.WEST)?18:e.width,s+=Math.max(s,e.height))}if(d){let e=d.getPreferredSize();e&&(o+=e.width,s+=Math.max(s,e.height))}if(p){let e=p.getPreferredSize();e&&(o+=this.isRegionCollapsed(f.EAST)?18:e.width,s+=Math.max(s,e.height))}return i=Math.max(i,o),a+=s,{width:i+n,height:a+r}}getMinSize(){let e=this.getContainer();if(!e)return null;let t=e.getPerimeterSize(),n=t.left+t.right,r=t.top+t.bottom,i=0,a=0,o=0,s=0,c=this.laidOut(this._northComponent),l=this.laidOut(this._southComponent),u=this.laidOut(this._westComponent),d=this.laidOut(this._centerComponent),p=this.laidOut(this._eastComponent);if(c){let e=c.getMinSize();e&&(i=Math.max(i,e.width),a+=this.isRegionCollapsed(f.NORTH)?18:e.height)}if(l){let e=l.getMinSize();e&&(i=Math.max(i,e.width),a+=this.isRegionCollapsed(f.SOUTH)?18:e.height)}if(u){let e=u.getMinSize();e&&(o+=this.isRegionCollapsed(f.WEST)?18:e.width,s+=Math.max(s,e.height))}if(d){let e=d.getMinSize();e&&(o+=e.width,s+=Math.max(s,e.height))}if(p){let e=p.getMinSize();e&&(o+=this.isRegionCollapsed(f.EAST)?18:e.width,s+=Math.max(s,e.height))}return i=Math.max(i,o),a+=s,{width:i+n,height:a+r}}getMaxSize(){let e=this.getContainer();if(!e)return null;let r=e.getPerimeterSize(),i=r.left+r.right,a=r.top+r.bottom,maxOf=e=>this.laidOut(e)?e.getMaxSize()??{width:t,height:t}:null,o=maxOf(this._northComponent),s=maxOf(this._southComponent),c=maxOf(this._westComponent),l=maxOf(this._centerComponent),u=maxOf(this._eastComponent),d=0,f=0,p=!1;for(let e of[c,l,u])e&&(p=!0,d+=e.width,f=Math.max(f,e.height));let m=t;o&&(m=Math.min(m,o.width)),s&&(m=Math.min(m,s.width)),p&&(m=Math.min(m,d));let h=0;return o&&(h+=o.height),p&&(h+=f),s&&(h+=s.height),{width:n(m+i),height:n(h+a)}}computeTotalMinSize(){if(!this.getContainer())return{width:0,height:0};let e=this.laidOut(this._westComponent)?.getMinSize(),t=this.laidOut(this._centerComponent)?.getMinSize(),n=this.laidOut(this._eastComponent)?.getMinSize(),r=this.laidOut(this._northComponent)?.getMinSize(),i=this.laidOut(this._southComponent)?.getMinSize(),a=[];e&&a.push(this.isRegionCollapsed(f.WEST)?18:e.width),t&&a.push(t.width),n&&a.push(this.isRegionCollapsed(f.EAST)?18:n.width);let o=[];r&&o.push(this.isRegionCollapsed(f.NORTH)?18:r.height),t&&o.push(t.height),i&&o.push(this.isRegionCollapsed(f.SOUTH)?18:i.height);let s=0,c=0;for(let e of a)s+=e;s+=Math.max(0,a.length-1)*this._spacing,r&&(s=Math.max(s,r.width)),i&&(s=Math.max(s,i.width));for(let e of o)c+=e;return c+=Math.max(0,o.length-1)*this._spacing,{width:s,height:c}}clearSkippedRegionFrames(...e){[this._northComponent,this._southComponent,this._westComponent,this._centerComponent,this._eastComponent].forEach((t,n)=>{t&&!e[n]&&t.clearClipFrame()})}doLayout(){let e=this.getContainer();if(!e)return;let t=e.getInnerSize();if(!t)throw Error(`Unable to determine component size.`);let n=e.getContentInsets();if(!n)throw Error(`Unable to determine component insets.`);t=this.inflateForOverflow(t);let r=this.laidOut(this._northComponent),a=this.laidOut(this._southComponent),o=this.laidOut(this._westComponent),s=this.laidOut(this._centerComponent),c=this.laidOut(this._eastComponent);this.clearSkippedRegionFrames(r,a,o,s,c);let l=t.width,u=t.height,d,p,m,h;if(r){let e=this.getLayoutConstraints(r);if(!e)throw Error(`Unable to determine layout constraints for north component.`);let t=r.getPreferredSize();if(!t)throw Error(`Unable to determine preferred size for north component.`);let u=this.regionExtent(f.NORTH,t.height),d=e.ignoreParentInsets?0:n.getLeft(),m=e.ignoreParentInsets?0:n.getTop(),h=l+(e.ignoreParentInsets?n.getLeft()+n.getRight():0),g=e.ignoreParentInsets?n.getTop():0;p=u+g,this.isRegionCollapsible(f.NORTH)||this._collapsing?(this.placeComponent(r,d,m,h,t.height+g,i.BOTH),r.clearClipFrame(),this.applyRegionClip(r,f.NORTH)):(r.setClipPath(null),r.setClipFrame(d,m,h,t.height+g),this.commitBounds(r,0,0,h,t.height+g)),this.updateRegionGutter(f.NORTH,d,m,h,p),(o||s||c||a)&&(p+=this._spacing)}else p=0;if(h=u-p,a){let e=a.getPreferredSize();if(!e)throw Error(`Unable to determine preferred size for south component.`);let t=this.regionExtent(f.SOUTH,e.height),r=n.getLeft(),o=n.getTop()+u-t;h-=this._spacing,h-=t;let s=n.getTop()+u-e.height;this.isRegionCollapsible(f.SOUTH)||this._collapsing?(this.placeComponent(a,r,s,l,e.height,i.BOTH),a.clearClipFrame(),this.applyRegionClip(a,f.SOUTH)):(a.setClipPath(null),a.setClipFrame(r,s,l,e.height),this.commitBounds(a,0,0,l,e.height)),this.updateRegionGutter(f.SOUTH,r,o,l,t)}let g=0,_=0;if(c){let e=c.getPreferredSize();if(!e)throw Error(`Unable to determine preferred size for east component.`);_=e.width,g=this.regionExtent(f.EAST,e.width)}if(o){let e=o.getPreferredSize();if(!e)throw Error(`Unable to determine preferred size for west component.`);let t=Math.max(0,Math.min(this.regionExtent(f.WEST,e.width),l-g)),r=n.getLeft(),a=n.getTop()+p;d=t;let c=Math.max(0,Math.min(e.width,l-g));this.isRegionCollapsible(f.WEST)||this._collapsing?(this.placeComponent(o,r,a,c,h,i.BOTH),o.clearClipFrame(),this.applyRegionClip(o,f.WEST)):(o.setClipPath(null),o.setClipFrame(r,a,c,h),this.commitBounds(o,0,0,c,h)),this.updateRegionGutter(f.WEST,r,a,t,h),s&&(d+=this._spacing)}else d=0;if(m=l-d,c){m-=this._spacing,m-=g;let e=n.getLeft()+l-g,t=n.getTop()+p,r=n.getLeft()+l-_;this.isRegionCollapsible(f.EAST)||this._collapsing?(this.placeComponent(c,r,t,_,h,i.BOTH),c.clearClipFrame(),this.applyRegionClip(c,f.EAST)):(c.setClipPath(null),c.setClipFrame(r,t,_,h),this.commitBounds(c,0,0,_,h)),this.updateRegionGutter(f.EAST,e,t,g,h)}if(s){let e=n.getLeft()+d,t=n.getTop()+p;this._collapsing?(this.placeComponent(s,e,t,m,h,i.BOTH),s.clearClipFrame()):(s.setClipFrame(e,t,m,h),this.commitBounds(s,0,0,m,h))}}detach(){this._collapseAnimation?.(),this._collapseAnimation=null,this._collapsing=!1;let t=(this.getContainer()?.getComponents().length??0)>0;for(let e of this._pendingCollapseTransitions)t?e.settle():e.cancel();this._pendingCollapseTransitions.length=0,super.detach();for(let t of this._gutters.values()){let n=t.getElement(),r=n?e.source.getParentNode(n):null;n&&r&&e.sink.removeChild(r,n),t.destroy()}this._gutters.clear();for(let e of[f.NORTH,f.SOUTH,f.WEST,f.EAST,f.CENTER])this.getRegionComponent(e)?.clearClipFrame();return this}},O=a(Border);export{beginPointerDrag as a,runCollapse as i,T as n,endPointerDrag as o,S as r,O as t};
|
|
2
|
-
//# sourceMappingURL=Border-BgaZkc1R.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t}from"./Position-A39T7-_1.js";import{d as n,l as r,u as i}from"./Component-DXf5a3g0.js";var BoxLayout=class extends r{_spacing=5;_stretching=!1;_mode=`preferred`;_overflowSizing=`preferred`;_justify=`start`;constructor(e){super(),e&&this.applyOptions(e)}applyOptions(e){super.applyOptions(e),e.mode!==void 0&&this.setMode(e.mode),e.spacing!==void 0&&this.setComponentSpacing(e.spacing),e.stretching!==void 0&&this.setStretching(e.stretching),e.overflowSizing!==void 0&&this.setOverflowSizing(e.overflowSizing),e.justify!==void 0&&this.setJustify(e.justify)}getComponentSpacing(){return this._spacing||0}setComponentSpacing(e){return this._spacing=e||0,this}isStretching(){return this._stretching||!1}setStretching(e){return this._stretching=!!e,this}getMode(){return this._mode}setMode(e){return this._mode=e,this}getOverflowSizing(){return this._overflowSizing}setOverflowSizing(e){return this._overflowSizing=e,this}getJustify(){return this._justify}setJustify(e){return this._justify=e,this}aggregateMaxSize(n){let r=this.getContainer();if(!r)return null;let i=r.getPerimeterSize(),a=r.getLaidOutComponents(),o=n?i.left+i.right:i.top+i.bottom,s=n?i.top+i.bottom:i.left+i.right,c=o,l=0,u=!1,d=!1,f=0;for(let e of a){let r=e.getMaxSize();if(!r){u=!0,d=!0;continue}let i=n?r.width:r.height,a=n?r.height:r.width;t(i)?u=!0:this._mode===`equal`?f=Math.max(f,i):c+=i,t(a)?d=!0:l=Math.max(l,a)}this._mode===`equal`?c+=a.length*f+this._spacing*Math.max(0,a.length-1):c+=this._spacing*Math.max(0,a.length-1),l+=s;let p=u?e:c,m=d?e:l;return{width:n?p:m,height:n?m:p}}computeShrink(e,t,n,r){if(e<=n||r)return{remaining:Math.max(0,n-e),shrinkRatio:0};let i=e-n,a=e-t;return{remaining:0,shrinkRatio:a>0?Math.min(1,i/a):1}}justifyOffsets(e,t,n){let r=Math.max(0,t-e);return r===0||this._justify===`start`?{lead:0,gap:0}:this._justify===`center`?{lead:r/2,gap:0}:this._justify===`end`?{lead:r,gap:0}:this._justify===`between`?{lead:0,gap:n>1?r/(n-1):0}:{lead:n>0?r/(2*n):0,gap:n>0?r/n:0}}crossPlacement(e,t,r,i,a){let o=this.getLayoutConstraints(e),s=o?.fill??null,c=o?.anchor??null;if(a?s===n.VERTICAL||s===n.BOTH:s===n.HORIZONTAL||s===n.BOTH)return{offset:t,extent:r};let l=this.crossAnchorEdge(c,a);if(l===null)return null;let u=Math.min(i,r);return{offset:l===`lead`?t:t+(r-u),extent:u}}crossAnchorEdge(e,t){return e===null?null:t?e===i.NORTH||e===i.NORTHWEST||e===i.NORTHEAST?`lead`:e===i.SOUTH||e===i.SOUTHWEST||e===i.SOUTHEAST?`trail`:null:e===i.WEST||e===i.NORTHWEST||e===i.SOUTHWEST?`lead`:e===i.EAST||e===i.NORTHEAST||e===i.SOUTHEAST?`trail`:null}};export{BoxLayout as t};
|
|
2
|
-
//# sourceMappingURL=BoxLayout-DrKGfsup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoxLayout-DrKGfsup.js","names":[],"sources":["../../src/typescript/lib/layout/BoxLayout.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { LayoutManager, LayoutManagerOptions } from \"~/layout/LayoutManager.js\";\nimport { FillType } from \"~/layout/FillType.js\";\nimport { AnchorType } from \"~/layout/AnchorType.js\";\nimport type { AxisPosition, AxisSpread } from \"~/primitive/Axis.js\";\nimport { Component } from \"~/core/Component.js\";\nimport { Size, UNBOUNDED, isUnbounded } from \"~/primitive/Size.js\";\n\n/**\n * Sizing strategy along an {@link HBox} or {@link VBox}'s main axis.\n *\n * - `\"preferred\"` — each child gets its preferred width (height for VBox);\n * `weight`-constrained children split the remaining space; an overflow\n * shrinks non-weighted children proportionally toward their min sizes.\n * - `\"equal\"` — children split the container's inner extent equally; the\n * per-cell floor is `max(child.minSize.width)` (height for VBox);\n * `weight` constraints are ignored.\n *\n * @category Layouts\n */\nexport type BoxMode = \"preferred\" | \"equal\";\n\n/**\n * How an `\"equal\"`-mode {@link HBox}/{@link VBox} sizes its cells when the\n * row/column overflows the host's inner extent and the host has opted into\n * scrolling (`Panel.setAutoScroll`).\n *\n * - `\"preferred\"` (the default) — every cell takes the widest/tallest child's\n * preferred extent, so cells keep their preferred size and the host scrolls.\n * - `\"min\"` — every cell stays at the min floor (`max(child.minSize)`), so the\n * row/column scrolls at the minimum cell size instead of growing.\n *\n * Has no effect outside `\"equal\"` mode, nor when the cells fit (the equal share\n * clears the min floor), nor when the host does not scroll (cells always clamp\n * to the min floor and the host's `overflow: hidden` clips the surplus).\n *\n * @category Layouts\n */\nexport type BoxOverflowSizing = \"preferred\" | \"min\";\n\n/**\n * How a `\"preferred\"`-mode {@link HBox}/{@link VBox} distributes the leftover\n * main-axis space when its children are shorter than the inner main extent and\n * no `weight` cells consume the slack. Mirrors CSS `justify-content`.\n *\n * A single line makes exactly one main-axis slack decision, so the two shared\n * axis concepts fuse into this one field: the {@link AxisPosition} half\n * (`\"start\"`/`\"center\"`/`\"end\"`) positions the whole child block as a unit,\n * while the {@link AxisSpread} half (`\"between\"`/`\"around\"`) spreads the slack\n * into the inter-child gaps. `justifyOffsets` reflects the split — position\n * values yield a leading offset (`lead`, `gap: 0`) and spread values yield an\n * inter-child `gap`. `\"start\"` is the shared identity of both halves, so the\n * union collapses to these five distinct values.\n *\n * - `\"start\"` (the default) — children pack at the leading edge; the slack sits\n * at the trailing edge.\n * - `\"center\"` — the child block is centred; equal slack on both ends.\n * - `\"end\"` — children pack at the trailing edge; the slack sits at the leading\n * edge.\n * - `\"between\"` — the first child sits at the leading edge, the last at the\n * trailing edge, and the slack is split evenly into the gaps between them.\n * - `\"around\"` — every child gets equal space around it: a half-unit before the\n * first and after the last, a full unit between neighbours.\n *\n * Has no effect outside `\"preferred\"` mode, nor when `weight` cells absorb the\n * slack, nor when the content fills or overflows the inner extent (the row\n * clamps to `\"start\"` so the leading child is never pushed out of view).\n *\n * @category Layouts\n */\nexport type BoxJustify = AxisPosition | AxisSpread;\n\n/**\n * Construction-time options shared by {@link HBox} and {@link VBox}.\n *\n * @remarks `mode` selects the sizing strategy along the box's main axis.\n * `\"preferred\"` (the default) honours each child's preferred main-axis extent\n * and supports `weight` cells. `\"equal\"` divides the container's main axis\n * equally and ignores `weight`. `mode` is independent of `stretching`, which\n * governs the cross axis: `stretching` defaults to `false` in both modes, so\n * `\"equal\"` divides the main axis but leaves children at their preferred\n * cross-axis extent unless `stretching: true` is passed.\n *\n * @category Layouts\n */\nexport interface BoxLayoutOptions extends LayoutManagerOptions {\n spacing?: number;\n stretching?: boolean;\n mode?: BoxMode;\n overflowSizing?: BoxOverflowSizing;\n justify?: BoxJustify;\n}\n\n/**\n * Abstract base for the single-axis box layouts {@link HBox} and {@link VBox}.\n * Holds the axis-agnostic configuration plumbing — spacing, stretching, sizing\n * mode, and overflow sizing — and dispatches a {@link BoxLayoutOptions} bag.\n * The geometric algorithms (`getPreferredSize`, `getMinSize`, `getMaxSize`,\n * `computeTotalMinSize`, `doLayout`) are mirror-image per axis and stay\n * concrete on each subclass.\n *\n * @category Layouts\n */\nexport abstract class BoxLayout extends LayoutManager {\n\n // `protected`, not `private`: the subclasses' geometric methods\n // (getPreferredSize/getMinSize/getMaxSize/computeTotalMinSize/doLayout)\n // read these fields directly, so they must be visible to HBox/VBox.\n protected _spacing: number = 5;\n protected _stretching: boolean = false;\n protected _mode: BoxMode = \"preferred\";\n protected _overflowSizing: BoxOverflowSizing = \"preferred\";\n protected _justify: BoxJustify = \"start\";\n\n constructor(options?: BoxLayoutOptions) {\n // LayoutManager's constructor takes no options; applied via applyOptions below.\n // eslint-disable-next-line local/forward-super-options\n super();\n\n if (options) {\n this.applyOptions(options);\n }\n }\n\n /**\n * Applies a {@link BoxLayoutOptions} bag, dispatching mode, spacing, and\n * stretching after the inherited LayoutManager defaults.\n *\n * @param options - The options bag carrying the values to apply.\n *\n * @remarks `mode` and `stretching` are independent axes: `mode` governs the\n * main-axis sizing strategy, `stretching` governs whether children fill the\n * cross axis. Neither defaults from the other — `stretching` is `false`\n * unless the options bag passes it explicitly, in both `\"preferred\"` and\n * `\"equal\"` mode.\n */\n protected applyOptions(options: BoxLayoutOptions): void {\n super.applyOptions(options);\n\n if (options.mode !== undefined) {\n this.setMode(options.mode);\n }\n\n if (options.spacing !== undefined) {\n this.setComponentSpacing(options.spacing);\n }\n\n if (options.stretching !== undefined) {\n this.setStretching(options.stretching);\n }\n\n if (options.overflowSizing !== undefined) {\n this.setOverflowSizing(options.overflowSizing);\n }\n\n if (options.justify !== undefined) {\n this.setJustify(options.justify);\n }\n }\n\n /**\n * Returns the pixel spacing between child components.\n *\n * @returns The current spacing in pixels.\n */\n getComponentSpacing(): number {\n return this._spacing || 0;\n }\n\n /**\n * Sets the pixel spacing between child components.\n *\n * @param spacing - Spacing in pixels.\n *\n * @returns This layout manager, for method chaining.\n */\n setComponentSpacing(spacing: number): this {\n this._spacing = spacing || 0;\n\n return this;\n }\n\n /**\n * Returns whether children stretch to fill the container's cross axis.\n *\n * @returns `true` if stretching is enabled.\n */\n isStretching(): boolean {\n return this._stretching || false;\n }\n\n /**\n * Sets whether children stretch to fill the container's cross axis.\n *\n * @param stretching - Pass `true` to enable cross-axis stretching.\n *\n * @returns This layout manager, for method chaining.\n */\n setStretching(stretching: boolean): this {\n this._stretching = !!stretching;\n\n return this;\n }\n\n /**\n * Returns the current sizing mode along the main axis.\n *\n * @returns Either `\"preferred\"` or `\"equal\"`.\n */\n getMode(): BoxMode {\n return this._mode;\n }\n\n /**\n * Sets the sizing mode along the main axis.\n *\n * @param mode - `\"preferred\"` honours each child's preferred main-axis\n * extent; `\"equal\"` divides the container's main axis equally among\n * children.\n *\n * @returns This layout manager, for method chaining.\n */\n setMode(mode: BoxMode): this {\n this._mode = mode;\n\n return this;\n }\n\n /**\n * Returns the cell-sizing strategy used when an `\"equal\"`-mode row/column\n * overflows a scrolling host.\n *\n * @returns Either `\"preferred\"` or `\"min\"`.\n */\n getOverflowSizing(): BoxOverflowSizing {\n return this._overflowSizing;\n }\n\n /**\n * Sets the cell-sizing strategy used when an `\"equal\"`-mode row/column\n * overflows a scrolling host.\n *\n * @param overflowSizing - `\"preferred\"` grows every cell to the largest\n * child's preferred extent and scrolls; `\"min\"` keeps cells at the min\n * floor and scrolls at the minimum cell size. See {@link BoxOverflowSizing}.\n *\n * @returns This layout manager, for method chaining.\n */\n setOverflowSizing(overflowSizing: BoxOverflowSizing): this {\n this._overflowSizing = overflowSizing;\n\n return this;\n }\n\n /**\n * Returns how leftover main-axis space is distributed in `\"preferred\"` mode.\n *\n * @returns The current {@link BoxJustify} mode.\n */\n getJustify(): BoxJustify {\n return this._justify;\n }\n\n /**\n * Sets how leftover main-axis space is distributed in `\"preferred\"` mode.\n *\n * @param justify - `\"start\"` packs children at the leading edge (the\n * default), `\"center\"`/`\"end\"` shift the block, and `\"between\"`/`\"around\"`\n * spread the slack into the inter-child gaps. See {@link BoxJustify}.\n *\n * @returns This layout manager, for method chaining.\n */\n setJustify(justify: BoxJustify): this {\n this._justify = justify;\n\n return this;\n }\n\n /**\n * Aggregates the children's maximum sizes per the box contract: main axis =\n * sum of child maxima (+ spacing; in `\"equal\"` mode count * widest-child-max),\n * cross axis = max of child maxima, a null or unbounded child max making that\n * axis unbounded. Saturated to {@link UNBOUNDED}. Includes the container\n * perimeter.\n *\n * @param horizontal - `true` for {@link HBox} (main = width), `false` for\n * {@link VBox} (main = height).\n * @returns The aggregated maximum `{width, height}`, or `null` if no\n * container is attached.\n */\n protected aggregateMaxSize(horizontal: boolean): Size | null {\n const container = this.getContainer();\n if (!container) {\n return null;\n }\n\n const perimeterSize = container.getPerimeterSize();\n const components = container.getLaidOutComponents();\n\n const mainStart = horizontal ? perimeterSize.left + perimeterSize.right : perimeterSize.top + perimeterSize.bottom;\n const crossExtra = horizontal ? perimeterSize.top + perimeterSize.bottom : perimeterSize.left + perimeterSize.right;\n\n let main = mainStart;\n let cross = 0;\n let mainUnbounded = false;\n let crossUnbounded = false;\n let maxChildMain = 0;\n\n for (const component of components) {\n const size = component.getMaxSize();\n\n if (!size) {\n mainUnbounded = true;\n crossUnbounded = true;\n continue;\n }\n\n const mainExtent = horizontal ? size.width : size.height;\n const crossExtent = horizontal ? size.height : size.width;\n\n if (isUnbounded(mainExtent)) {\n mainUnbounded = true;\n } else if (this._mode === \"equal\") {\n maxChildMain = Math.max(maxChildMain, mainExtent);\n } else {\n main += mainExtent;\n }\n\n if (isUnbounded(crossExtent)) {\n crossUnbounded = true;\n } else {\n cross = Math.max(cross, crossExtent);\n }\n }\n\n if (this._mode === \"equal\") {\n main += components.length * maxChildMain + this._spacing * Math.max(0, components.length - 1);\n } else {\n main += this._spacing * Math.max(0, components.length - 1);\n }\n\n cross += crossExtra;\n\n const mainValue = mainUnbounded ? UNBOUNDED : main;\n const crossValue = crossUnbounded ? UNBOUNDED : cross;\n\n return {\n width: horizontal ? mainValue : crossValue,\n height: horizontal ? crossValue : mainValue\n };\n }\n\n /**\n * Resolves how much main-axis space the weight cells share and how hard the\n * non-weighted children must shrink. When the non-weighted children's\n * preferred extents fit (or the host scrolls on this axis), nothing shrinks\n * and the leftover is the weight remainder. Otherwise the children shrink\n * proportionally toward their min extents so the last child's far edge lands\n * inside the container.\n *\n * @param fixedPreferred - Summed preferred main-axis extent of the\n * non-weighted children, including inter-child spacing.\n * @param fixedMin - Summed minimum main-axis extent of the same children,\n * including spacing.\n * @param available - The working container's inner extent on the main axis.\n * @param overflowing - Whether the host has opted into scrolling on this\n * axis; when `true` the shrink is skipped so the host's CSS overflow\n * engages instead.\n * @returns `remaining` — the main-axis space left for weight cells — and\n * `shrinkRatio` — `0` (no shrink) through `1` (shrink fully to min).\n */\n protected computeShrink(fixedPreferred: number, fixedMin: number, available: number, overflowing: boolean): { remaining: number; shrinkRatio: number } {\n if (fixedPreferred <= available || overflowing) {\n return { remaining: Math.max(0, available - fixedPreferred), shrinkRatio: 0 };\n }\n\n const excess = fixedPreferred - available;\n const shrinkable = fixedPreferred - fixedMin;\n\n return { remaining: 0, shrinkRatio: shrinkable > 0 ? Math.min(1, excess / shrinkable) : 1 };\n }\n\n /**\n * Distributes the trailing main-axis slack per {@link BoxJustify}, returning\n * a leading offset and an extra inter-child gap. The subclass adds `lead` to\n * the placement cursor's start and `gap` to the inter-child spacing. A row\n * that fills or overflows the inner extent (`residual === 0`) and the\n * `\"start\"` fast path both return `{ lead: 0, gap: 0 }`, leaving placement\n * byte-identical to the un-justified loop. Generalises\n * {@link FlowLayout.alignLead}, which only produces a leading offset, by also\n * spreading slack into the gaps for `\"between\"`/`\"around\"`.\n *\n * @param contentMain - Summed placed child main-extents plus inter-child\n * spacing — the block's total main extent.\n * @param innerMain - The container's inner extent along the main axis.\n * @param count - The number of children sharing the axis.\n * @returns `lead` — pixels added before the first child — and `gap` — pixels\n * added to the spacing after each child. Both are non-negative.\n */\n protected justifyOffsets(contentMain: number, innerMain: number, count: number): { lead: number; gap: number } {\n const residual = Math.max(0, innerMain - contentMain);\n\n if (residual === 0 || this._justify === \"start\") {\n return { lead: 0, gap: 0 };\n }\n\n if (this._justify === \"center\") {\n return { lead: residual / 2, gap: 0 };\n }\n\n if (this._justify === \"end\") {\n return { lead: residual, gap: 0 };\n }\n\n if (this._justify === \"between\") {\n return { lead: 0, gap: count > 1 ? residual / (count - 1) : 0 };\n }\n\n // \"around\"\n return { lead: count > 0 ? residual / (2 * count) : 0, gap: count > 0 ? residual / count : 0 };\n }\n\n /**\n * Resolves a child's cross-axis offset and extent within the full cross\n * band, honouring an explicit per-child cross `fill`/`anchor` (align-self).\n * A cross-axis `fill` (`VERTICAL`/`BOTH` in an {@link HBox}, `HORIZONTAL`/\n * `BOTH` in a {@link VBox}) stretches the child to the whole band; a\n * cross-axis `anchor` edge (NORTH/SOUTH for HBox, WEST/EAST for VBox, plus\n * the corners carrying that component) pins the child's natural cross extent\n * to the leading or trailing edge. The main-axis `anchor` component and\n * `CENTER` are deliberately inert — the box owns main-axis sequencing and\n * each box's default cross placement (HBox baseline, VBox WEST origin) is\n * more specific than geometric centring.\n *\n * @param component - The child whose constraints supply the cross intent.\n * @param crossLead - The band's leading edge (`insets.top` for HBox,\n * `insets.left` for VBox).\n * @param crossExtent - The full cross band extent.\n * @param naturalCross - The child's preferred cross extent, already capped to\n * the band and the child's maximum; the anchored child sits at this extent.\n * @param horizontal - `true` for {@link HBox} (cross axis is vertical),\n * `false` for {@link VBox} (cross axis is horizontal).\n * @returns `{ offset, extent }` when the child sets an explicit cross intent,\n * or `null` to signal the caller to keep its default cross placement.\n */\n protected crossPlacement(component: Component, crossLead: number, crossExtent: number, naturalCross: number, horizontal: boolean): { offset: number; extent: number } | null {\n const constraints = this.getLayoutConstraints(component);\n const fill = constraints?.fill ?? null;\n const anchor = constraints?.anchor ?? null;\n\n const crossFill = horizontal\n ? (fill === FillType.VERTICAL || fill === FillType.BOTH)\n : (fill === FillType.HORIZONTAL || fill === FillType.BOTH);\n\n if (crossFill) {\n return { offset: crossLead, extent: crossExtent };\n }\n\n const edge = this.crossAnchorEdge(anchor, horizontal);\n\n if (edge === null) {\n return null;\n }\n\n const extent = Math.min(naturalCross, crossExtent);\n const offset = edge === \"lead\"\n ? crossLead\n : crossLead + (crossExtent - extent);\n\n return { offset, extent };\n }\n\n /**\n * Projects a child's `anchor` onto the cross axis as a leading/trailing edge.\n * CENTER and pure main-axis anchors carry no cross component and return\n * `null`, leaving the caller on its default cross placement.\n *\n * @param anchor - The child's anchor constraint, or `null`.\n * @param horizontal - `true` for {@link HBox} (cross = vertical: NORTH=lead,\n * SOUTH=trail), `false` for {@link VBox} (cross = horizontal: WEST=lead,\n * EAST=trail).\n * @returns `\"lead\"`/`\"trail\"` for an anchor with a cross component, else `null`.\n */\n private crossAnchorEdge(anchor: AnchorType | null, horizontal: boolean): \"lead\" | \"trail\" | null {\n if (anchor === null) {\n return null;\n }\n\n if (horizontal) {\n if (anchor === AnchorType.NORTH || anchor === AnchorType.NORTHWEST || anchor === AnchorType.NORTHEAST) {\n return \"lead\";\n }\n\n if (anchor === AnchorType.SOUTH || anchor === AnchorType.SOUTHWEST || anchor === AnchorType.SOUTHEAST) {\n return \"trail\";\n }\n\n return null;\n }\n\n if (anchor === AnchorType.WEST || anchor === AnchorType.NORTHWEST || anchor === AnchorType.SOUTHWEST) {\n return \"lead\";\n }\n\n if (anchor === AnchorType.EAST || anchor === AnchorType.NORTHEAST || anchor === AnchorType.SOUTHEAST) {\n return \"trail\";\n }\n\n return null;\n }\n}\n"],"mappings":"4GAwGA,IAAsB,UAAtB,cAAwC,CAAc,CAKlD,SAA6B,EAC7B,YAAiC,GACjC,MAA2B,YAC3B,gBAA+C,YAC/C,SAAiC,QAEjC,YAAY,EAA4B,CAGpC,MAAM,EAEF,GACA,KAAK,aAAa,CAAO,CAEjC,CAcA,aAAuB,EAAiC,CACpD,MAAM,aAAa,CAAO,EAEtB,EAAQ,OAAS,IAAA,IACjB,KAAK,QAAQ,EAAQ,IAAI,EAGzB,EAAQ,UAAY,IAAA,IACpB,KAAK,oBAAoB,EAAQ,OAAO,EAGxC,EAAQ,aAAe,IAAA,IACvB,KAAK,cAAc,EAAQ,UAAU,EAGrC,EAAQ,iBAAmB,IAAA,IAC3B,KAAK,kBAAkB,EAAQ,cAAc,EAG7C,EAAQ,UAAY,IAAA,IACpB,KAAK,WAAW,EAAQ,OAAO,CAEvC,CAOA,qBAA8B,CAC1B,OAAO,KAAK,UAAY,CAC5B,CASA,oBAAoB,EAAuB,CAGvC,MAFA,MAAK,SAAW,GAAW,EAEpB,IACX,CAOA,cAAwB,CACpB,OAAO,KAAK,aAAe,EAC/B,CASA,cAAc,EAA2B,CAGrC,MAFA,MAAK,YAAc,CAAC,CAAC,EAEd,IACX,CAOA,SAAmB,CACf,OAAO,KAAK,KAChB,CAWA,QAAQ,EAAqB,CAGzB,MAFA,MAAK,MAAQ,EAEN,IACX,CAQA,mBAAuC,CACnC,OAAO,KAAK,eAChB,CAYA,kBAAkB,EAAyC,CAGvD,MAFA,MAAK,gBAAkB,EAEhB,IACX,CAOA,YAAyB,CACrB,OAAO,KAAK,QAChB,CAWA,WAAW,EAA2B,CAGlC,MAFA,MAAK,SAAW,EAET,IACX,CAcA,iBAA2B,EAAkC,CACzD,IAAM,EAAY,KAAK,aAAa,EACpC,GAAI,CAAC,EACD,OAAO,KAGX,IAAM,EAAgB,EAAU,iBAAiB,EAC3C,EAAa,EAAU,qBAAqB,EAE5C,EAAa,EAAa,EAAc,KAAO,EAAc,MAAQ,EAAc,IAAM,EAAc,OACvG,EAAa,EAAa,EAAc,IAAM,EAAc,OAAS,EAAc,KAAO,EAAc,MAE1G,EAAO,EACP,EAAQ,EACR,EAAgB,GAChB,EAAiB,GACjB,EAAe,EAEnB,IAAK,IAAM,KAAa,EAAY,CAChC,IAAM,EAAO,EAAU,WAAW,EAElC,GAAI,CAAC,EAAM,CACP,EAAgB,GAChB,EAAiB,GACjB,QACJ,CAEA,IAAM,EAAc,EAAa,EAAK,MAAS,EAAK,OAC9C,EAAc,EAAa,EAAK,OAAS,EAAK,MAEhD,EAAY,CAAU,EACtB,EAAgB,GACT,KAAK,QAAU,QACtB,EAAe,KAAK,IAAI,EAAc,CAAU,EAEhD,GAAQ,EAGR,EAAY,CAAW,EACvB,EAAiB,GAEjB,EAAQ,KAAK,IAAI,EAAO,CAAW,CAE3C,CAEI,KAAK,QAAU,QACf,GAAQ,EAAW,OAAS,EAAe,KAAK,SAAW,KAAK,IAAI,EAAG,EAAW,OAAS,CAAC,EAE5F,GAAQ,KAAK,SAAW,KAAK,IAAI,EAAG,EAAW,OAAS,CAAC,EAG7D,GAAS,EAET,IAAM,EAAa,EAAiB,EAAY,EAC1C,EAAa,EAAiB,EAAY,EAEhD,MAAO,CACH,MAAQ,EAAa,EAAa,EAClC,OAAQ,EAAa,EAAa,CACtC,CACJ,CAqBA,cAAwB,EAAwB,EAAkB,EAAmB,EAAkE,CACnJ,GAAI,GAAkB,GAAa,EAC/B,MAAO,CAAE,UAAW,KAAK,IAAI,EAAG,EAAY,CAAc,EAAG,YAAa,CAAE,EAGhF,IAAM,EAAa,EAAiB,EAC9B,EAAa,EAAiB,EAEpC,MAAO,CAAE,UAAW,EAAG,YAAa,EAAa,EAAI,KAAK,IAAI,EAAG,EAAS,CAAU,EAAI,CAAE,CAC9F,CAmBA,eAAyB,EAAqB,EAAmB,EAA8C,CAC3G,IAAM,EAAW,KAAK,IAAI,EAAG,EAAY,CAAW,EAmBpD,OAjBI,IAAa,GAAK,KAAK,WAAa,QAC7B,CAAE,KAAM,EAAG,IAAK,CAAE,EAGzB,KAAK,WAAa,SACX,CAAE,KAAM,EAAW,EAAG,IAAK,CAAE,EAGpC,KAAK,WAAa,MACX,CAAE,KAAM,EAAU,IAAK,CAAE,EAGhC,KAAK,WAAa,UACX,CAAE,KAAM,EAAG,IAAK,EAAQ,EAAI,GAAY,EAAQ,GAAK,CAAE,EAI3D,CAAE,KAAM,EAAQ,EAAI,GAAY,EAAI,GAAS,EAAG,IAAK,EAAQ,EAAI,EAAW,EAAQ,CAAE,CACjG,CAyBA,eAAyB,EAAsB,EAAmB,EAAqB,EAAsB,EAAgE,CACzK,IAAM,EAAc,KAAK,qBAAqB,CAAS,EACjD,EAAS,GAAa,MAAU,KAChC,EAAS,GAAa,QAAU,KAMtC,GAJkB,EACX,IAAS,EAAS,UAAY,IAAS,EAAS,KAChD,IAAS,EAAS,YAAc,IAAS,EAAS,KAGrD,MAAO,CAAE,OAAQ,EAAW,OAAQ,CAAY,EAGpD,IAAM,EAAO,KAAK,gBAAgB,EAAQ,CAAU,EAEpD,GAAI,IAAS,KACT,OAAO,KAGX,IAAM,EAAS,KAAK,IAAI,EAAc,CAAW,EAKjD,MAAO,CAAE,OAJM,IAAS,OAClB,EACA,GAAa,EAAc,GAEhB,QAAO,CAC5B,CAaA,gBAAwB,EAA2B,EAA8C,CAyB7F,OAxBI,IAAW,KACJ,KAGP,EACI,IAAW,EAAW,OAAS,IAAW,EAAW,WAAa,IAAW,EAAW,UACjF,OAGP,IAAW,EAAW,OAAS,IAAW,EAAW,WAAa,IAAW,EAAW,UACjF,QAGJ,KAGP,IAAW,EAAW,MAAQ,IAAW,EAAW,WAAa,IAAW,EAAW,UAChF,OAGP,IAAW,EAAW,MAAQ,IAAW,EAAW,WAAa,IAAW,EAAW,UAChF,QAGJ,IACX,CACJ"}
|