@jimka/typescript-ui 0.3.0 → 0.4.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/dist/lib/{AbstractBooleanInput-C3O4kv7_.js → AbstractBooleanInput-DSwKBAic.js} +2 -2
- package/dist/lib/{AbstractBooleanInput-C3O4kv7_.js.map → AbstractBooleanInput-DSwKBAic.js.map} +1 -1
- package/dist/lib/{AbstractInput-DFWniHqq.js → AbstractInput-BmWGJTs1.js} +2 -2
- package/dist/lib/{AbstractInput-DFWniHqq.js.map → AbstractInput-BmWGJTs1.js.map} +1 -1
- package/dist/lib/{AnchorConstraints-CSUcj8Wx.js → AnchorConstraints-CVrMP9rz.js} +2 -2
- package/dist/lib/{AnchorConstraints-CSUcj8Wx.js.map → AnchorConstraints-CVrMP9rz.js.map} +1 -1
- package/dist/lib/{AnimatedDropdown-e9urCXK1.js → AnimatedDropdown-DKas40B-.js} +2 -2
- package/dist/lib/{AnimatedDropdown-e9urCXK1.js.map → AnimatedDropdown-DKas40B-.js.map} +1 -1
- package/dist/lib/Border-Bz29z-_7.js +2 -0
- package/dist/lib/Border-Bz29z-_7.js.map +1 -0
- package/dist/lib/Button-bjpWruNc.js +2 -0
- package/dist/lib/{Button-B36rBMKC.js.map → Button-bjpWruNc.js.map} +1 -1
- package/dist/lib/{Card-P8iUH2-C.js → Card-BdfbvOD_.js} +2 -2
- package/dist/lib/{Card-P8iUH2-C.js.map → Card-BdfbvOD_.js.map} +1 -1
- package/dist/lib/ComboBox-CBw2VLLN.js +2 -0
- package/dist/lib/ComboBox-CBw2VLLN.js.map +1 -0
- package/dist/lib/Component-DHqrPwAw.js +2 -0
- package/dist/lib/Component-DHqrPwAw.js.map +1 -0
- package/dist/lib/Container-CAQpj4yb.js +2 -0
- package/dist/lib/{Container-xUbHk6l_.js.map → Container-CAQpj4yb.js.map} +1 -1
- package/dist/lib/{DOM-BeR95tE8.js → DOM-67StIm5G.js} +2 -2
- package/dist/lib/DOM-67StIm5G.js.map +1 -0
- package/dist/lib/DragChain-CYGuT7OA.js +2 -0
- package/dist/lib/DragChain-CYGuT7OA.js.map +1 -0
- package/dist/lib/DragManager-CHWCe3-8.js +2 -0
- package/dist/lib/DragManager-CHWCe3-8.js.map +1 -0
- package/dist/lib/{FieldDecorator-BaTGfKiW.js → FieldDecorator-CgAGcqCk.js} +2 -2
- package/dist/lib/{FieldDecorator-BaTGfKiW.js.map → FieldDecorator-CgAGcqCk.js.map} +1 -1
- package/dist/lib/{Fit-E-EIZv1k.js → Fit-DIYt2aQB.js} +2 -2
- package/dist/lib/{Fit-E-EIZv1k.js.map → Fit-DIYt2aQB.js.map} +1 -1
- package/dist/lib/Glyph-CeAIWyPB.js +2 -0
- package/dist/lib/Glyph-CeAIWyPB.js.map +1 -0
- package/dist/lib/{Grid-BXS2T8MT.js → Grid-ViA0joow.js} +2 -2
- package/dist/lib/{Grid-BXS2T8MT.js.map → Grid-ViA0joow.js.map} +1 -1
- package/dist/lib/GridConstraints-B1rxCw9B.js +2 -0
- package/dist/lib/GridConstraints-B1rxCw9B.js.map +1 -0
- package/dist/lib/Header-mKaqgfat.js +2 -0
- package/dist/lib/Header-mKaqgfat.js.map +1 -0
- package/dist/lib/IconText-BqwXA82-.js +2 -0
- package/dist/lib/IconText-BqwXA82-.js.map +1 -0
- package/dist/lib/{LayoutSerialization-D1OHmxSB.js → LayoutSerialization-D82UtnDD.js} +2 -2
- package/dist/lib/{LayoutSerialization-D1OHmxSB.js.map → LayoutSerialization-D82UtnDD.js.map} +1 -1
- package/dist/lib/LayoutSizes-DG9aW9k6.js +2 -0
- package/dist/lib/LayoutSizes-DG9aW9k6.js.map +1 -0
- package/dist/lib/List-CUntS8ux.js +2 -0
- package/dist/lib/List-CUntS8ux.js.map +1 -0
- package/dist/lib/MemoryStore-DT6iWWco.js.map +1 -1
- package/dist/lib/Menu-B_-SQj72.js +2 -0
- package/dist/lib/Menu-B_-SQj72.js.map +1 -0
- package/dist/lib/{MenuButton-Bjm1OyB-.js → MenuButton-C79l8Ysf.js} +2 -2
- package/dist/lib/{MenuButton-Bjm1OyB-.js.map → MenuButton-C79l8Ysf.js.map} +1 -1
- package/dist/lib/{Panel-D9lTLGqP.js → Panel-D2X33qR6.js} +2 -2
- package/dist/lib/{Panel-D9lTLGqP.js.map → Panel-D2X33qR6.js.map} +1 -1
- package/dist/lib/Position-Ck_KD4cR.js +2 -0
- package/dist/lib/Position-Ck_KD4cR.js.map +1 -0
- package/dist/lib/{ProgressSpinner-glv-29eK.js → ProgressSpinner-DCyq02pd.js} +2 -2
- package/dist/lib/{ProgressSpinner-glv-29eK.js.map → ProgressSpinner-DCyq02pd.js.map} +1 -1
- package/dist/lib/{RadioButton-R4S3c9WD.js → RadioButton-BJIAQkII.js} +2 -2
- package/dist/lib/{RadioButton-R4S3c9WD.js.map → RadioButton-BJIAQkII.js.map} +1 -1
- package/dist/lib/{RovingTabIndex-Dgt01LOE.js → RovingTabIndex-DFJyoveq.js} +2 -2
- package/dist/lib/{RovingTabIndex-Dgt01LOE.js.map → RovingTabIndex-DFJyoveq.js.map} +1 -1
- package/dist/lib/Scrollbar-CSFK-Y57.js +2 -0
- package/dist/lib/Scrollbar-CSFK-Y57.js.map +1 -0
- package/dist/lib/Slider-C-kQQYCj.js +2 -0
- package/dist/lib/Slider-C-kQQYCj.js.map +1 -0
- package/dist/lib/{Spacer-B57i2-_G.js → Spacer-D159iJy9.js} +2 -2
- package/dist/lib/{Spacer-B57i2-_G.js.map → Spacer-D159iJy9.js.map} +1 -1
- package/dist/lib/TabButton-CHkXBgCj.js +2 -0
- package/dist/lib/TabButton-CHkXBgCj.js.map +1 -0
- package/dist/lib/{Text-Bni4icFY.js → Text-D5pg7taZ.js} +2 -2
- package/dist/lib/{Text-Bni4icFY.js.map → Text-D5pg7taZ.js.map} +1 -1
- package/dist/lib/Tooltip-DzK6LxUt.js +3 -0
- package/dist/lib/{Tooltip-BUy6uFKN.js.map → Tooltip-DzK6LxUt.js.map} +1 -1
- package/dist/lib/VBox-BNegDPs_.js +2 -0
- package/dist/lib/VBox-BNegDPs_.js.map +1 -0
- package/dist/lib/VirtualScroller-zQr-vKrO.js +2 -0
- package/dist/lib/VirtualScroller-zQr-vKrO.js.map +1 -0
- 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/container.es.js.map +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/display.es.js.map +1 -1
- package/dist/lib/component/editor.es.js +2 -2
- 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/list.es.js.map +1 -1
- package/dist/lib/component/menubar.es.js +1 -1
- package/dist/lib/component/menubar.es.js.map +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/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/selectionsEqual-4r5R7pTK.js +2 -0
- package/dist/lib/selectionsEqual-4r5R7pTK.js.map +1 -0
- package/dist/lib/types/component/button/TabCloseButton.d.ts +1 -1
- package/dist/lib/types/component/container/CollapseButton.d.ts +1 -1
- package/dist/lib/types/component/container/DialogBackdrop.d.ts +1 -1
- package/dist/lib/types/component/container/MenuItem.d.ts +4 -0
- package/dist/lib/types/component/container/MenuSeparator.d.ts +1 -1
- package/dist/lib/types/component/container/Scrollbar.d.ts +1 -0
- package/dist/lib/types/component/container/SplitGutter.d.ts +2 -2
- package/dist/lib/types/component/container/StatusBar.d.ts +1 -1
- package/dist/lib/types/component/container/VirtualScroller.d.ts +1 -0
- package/dist/lib/types/component/container/WindowBorder.d.ts +1 -1
- package/dist/lib/types/component/diagram/DiagramNode.d.ts +1 -1
- package/dist/lib/types/component/display/Canvas.d.ts +8 -2
- package/dist/lib/types/component/display/Glyph.d.ts +2 -1
- package/dist/lib/types/component/display/Header.d.ts +1 -1
- package/dist/lib/types/component/display/IconLabel.d.ts +1 -1
- package/dist/lib/types/component/display/IconText.d.ts +1 -1
- package/dist/lib/types/component/display/Image.d.ts +1 -1
- package/dist/lib/types/component/display/Video.d.ts +1 -1
- package/dist/lib/types/component/display/WebGLCanvas.d.ts +8 -2
- package/dist/lib/types/component/editor/CodeEditor.d.ts +1 -1
- package/dist/lib/types/component/input/AbstractPickerField.d.ts +1 -1
- package/dist/lib/types/component/input/AutoCompleteDropdown.d.ts +1 -1
- package/dist/lib/types/component/input/Link.d.ts +1 -1
- package/dist/lib/types/component/input/NumberSpinner.d.ts +1 -1
- package/dist/lib/types/component/input/PasswordField.d.ts +1 -1
- package/dist/lib/types/component/input/SpinButton.d.ts +1 -1
- package/dist/lib/types/component/input/TextArea.d.ts +1 -1
- package/dist/lib/types/component/input/TextField.d.ts +3 -1
- package/dist/lib/types/component/input/UsernameField.d.ts +1 -1
- package/dist/lib/types/component/list/AbstractMarkerList.d.ts +9 -1
- package/dist/lib/types/component/list/BulletedList.d.ts +1 -0
- package/dist/lib/types/component/list/ListItem.d.ts +10 -4
- package/dist/lib/types/component/list/NumberedList.d.ts +1 -0
- package/dist/lib/types/component/menubar/MenuBarButton.d.ts +1 -1
- package/dist/lib/types/component/menubar/ToolBar.d.ts +1 -1
- package/dist/lib/types/component/menubar/ToolBarSeparator.d.ts +1 -1
- package/dist/lib/types/component/shared/VirtualRowView.d.ts +13 -1
- package/dist/lib/types/component/table/Body.d.ts +15 -2
- package/dist/lib/types/component/table/CellGeometry.d.ts +6 -0
- package/dist/lib/types/component/table/Column.d.ts +4 -0
- package/dist/lib/types/component/table/ColumnConfig.d.ts +3 -0
- package/dist/lib/types/component/table/Header.d.ts +24 -2
- package/dist/lib/types/component/table/Row.d.ts +13 -2
- package/dist/lib/types/component/table/Table.d.ts +25 -4
- package/dist/lib/types/component/table/TableExporter.d.ts +1 -1
- package/dist/lib/types/component/table/TablePanel.d.ts +2 -1
- package/dist/lib/types/component/table/cell/Cell.d.ts +1 -1
- package/dist/lib/types/component/table/cell/Header.d.ts +3 -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 +1 -1
- package/dist/lib/types/core/Body.d.ts +8 -2
- package/dist/lib/types/core/Component.d.ts +6 -0
- package/dist/lib/types/core/DOM.d.ts +4 -0
- package/dist/lib/types/core/DragChain.d.ts +3 -0
- package/dist/lib/types/core/Favicon.d.ts +7 -0
- package/dist/lib/types/core/FirstLayoutGate.d.ts +5 -0
- package/dist/lib/types/core/Theme.d.ts +1 -0
- package/dist/lib/types/core/Util.d.ts +1 -0
- package/dist/lib/types/core/index.d.ts +2 -0
- package/dist/lib/types/layout/Accordion.d.ts +0 -1
- package/dist/lib/types/layout/FlowLayout.d.ts +4 -0
- package/dist/lib/types/layout/HFlow.d.ts +3 -0
- package/dist/lib/types/layout/VFlow.d.ts +1 -0
- package/dist/lib/types/overlay/AbstractWindow.d.ts +1 -1
- package/dist/lib/types/overlay/Dock.d.ts +1 -0
- package/dist/lib/types/overlay/DropZoneOverlay.d.ts +1 -0
- package/dist/lib/types/overlay/Popover.d.ts +1 -1
- package/dist/lib/validation.es.js +1 -1
- package/llms.txt +1 -0
- package/package.json +2 -2
- package/dist/lib/Border-Dq6dXkmS.js +0 -2
- package/dist/lib/Border-Dq6dXkmS.js.map +0 -1
- package/dist/lib/Button-B36rBMKC.js +0 -2
- package/dist/lib/ComboBox-BjAhXXkY.js +0 -2
- package/dist/lib/ComboBox-BjAhXXkY.js.map +0 -1
- package/dist/lib/Component-CHTzJxEf.js +0 -2
- package/dist/lib/Component-CHTzJxEf.js.map +0 -1
- package/dist/lib/Container-xUbHk6l_.js +0 -2
- package/dist/lib/DOM-BeR95tE8.js.map +0 -1
- package/dist/lib/DragManager-T5Oljd0F.js +0 -2
- package/dist/lib/DragManager-T5Oljd0F.js.map +0 -1
- package/dist/lib/Glyph-CnNslL95.js +0 -2
- package/dist/lib/Glyph-CnNslL95.js.map +0 -1
- package/dist/lib/GridConstraints-D_kbd-h2.js +0 -2
- package/dist/lib/GridConstraints-D_kbd-h2.js.map +0 -1
- package/dist/lib/HBox-Dm3xgsDE.js +0 -2
- package/dist/lib/HBox-Dm3xgsDE.js.map +0 -1
- package/dist/lib/Header-CqFc2OUx.js +0 -2
- package/dist/lib/Header-CqFc2OUx.js.map +0 -1
- package/dist/lib/IconText-CTM2r0Tv.js +0 -2
- package/dist/lib/IconText-CTM2r0Tv.js.map +0 -1
- package/dist/lib/LayoutSizes-CvMmMgHJ.js +0 -2
- package/dist/lib/LayoutSizes-CvMmMgHJ.js.map +0 -1
- package/dist/lib/List-DHeOPAK2.js +0 -2
- package/dist/lib/List-DHeOPAK2.js.map +0 -1
- package/dist/lib/Menu-B6ippw-p.js +0 -2
- package/dist/lib/Menu-B6ippw-p.js.map +0 -1
- package/dist/lib/Position-DRSlWn4Z.js +0 -2
- package/dist/lib/Position-DRSlWn4Z.js.map +0 -1
- package/dist/lib/Scrollbar-CiVV3axj.js +0 -2
- package/dist/lib/Scrollbar-CiVV3axj.js.map +0 -1
- package/dist/lib/Slider-_JVvuQ8M.js +0 -2
- package/dist/lib/Slider-_JVvuQ8M.js.map +0 -1
- package/dist/lib/TabButton-DEypdlZf.js +0 -2
- package/dist/lib/TabButton-DEypdlZf.js.map +0 -1
- package/dist/lib/Tooltip-BUy6uFKN.js +0 -3
- package/dist/lib/VBox-Dr7Ge9M6.js +0 -2
- package/dist/lib/VBox-Dr7Ge9M6.js.map +0 -1
- package/dist/lib/VirtualScroller-BPy6KmSX.js +0 -2
- package/dist/lib/VirtualScroller-BPy6KmSX.js.map +0 -1
- package/dist/lib/selectionsEqual-2PJrcimg.js +0 -2
- package/dist/lib/selectionsEqual-2PJrcimg.js.map +0 -1
package/dist/lib/primitive.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./Position-
|
|
1
|
+
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./Position-Ck_KD4cR.js";import{t as c}from"./Placement-7kqdaK4Z.js";var Point=class extends t{_x;_y;constructor(e,t){super(),this._x=e??0,this._y=t??0}getX(){return this._x??0}getY(){return this._y??0}render(){return this.getX()+` `+this.getY()}};export{r as Insets,c as Placement,Point,s as Position,e as UNBOUNDED,a as borderSideWidth,n as borderToStyle,i as isUnbounded,o as saturate};
|
|
2
2
|
//# sourceMappingURL=primitive.es.js.map
|
package/dist/lib/router.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./DOM-
|
|
1
|
+
import{t as e}from"./DOM-67StIm5G.js";import{t}from"./ListenerBag-WPdKuuds.js";function normalizePath(e){let t=e.startsWith(`#`)?e.slice(1):e,n=t.indexOf(`?`);return n>=0&&(t=t.slice(0,n)),`/`+splitPath(t).join(`/`)}function splitPath(e){return e.split(`/`).filter(e=>e.length>0)}function splitFragment(e){let t=e.indexOf(`#`);return t===-1?{path:e,fragment:``}:{path:e.slice(0,t),fragment:e.slice(t+1)}}function normalizeBase(e){let t=splitPath(e);return t.length===0?`/`:`/`+t.join(`/`)+`/`}function stripBase(e,t){let n=normalizeBase(e).slice(0,-1);return n!==``&&(t===n||t.startsWith(n+`/`))?normalizePath(t.slice(n.length)):normalizePath(t)}function joinBase(e,t){let n=normalizeBase(e),r=normalizePath(t);return r===`/`?n:n.slice(0,-1)+r}function compilePattern(e){let t=normalizePath(e),n=splitPath(t),r=n.map((t,r)=>{if(t===`*`){if(r!==n.length-1)throw Error(`RoutePattern: "*" is only valid as the final segment of "${e}"`);return{kind:`catchAll`,value:``}}return t.startsWith(`:`)?{kind:`param`,value:t.slice(1)}:{kind:`static`,value:t}});return{pattern:t,key:r.map(e=>e.kind===`static`?e.value:e.kind===`param`?`:`:`*`).join(`/`),segments:r}}function matchPattern(e,t){let n=e.segments,r=n.length>0&&n.at(-1).kind===`catchAll`,i=r?n.length-1:n.length;if(r?t.length<i:t.length!==i)return null;let a={};for(let e=0;e<i;e+=1){let r=n[e],i=t[e];if(r.kind===`static`){if(r.value!==i)return null}else r.kind===`param`&&(a[r.value]=decodeSegment(i))}return a}function decodeSegment(e){try{return decodeURIComponent(e)}catch{return e}}var n={static:2,param:1,catchAll:0};function rankAt(e,t){return t>=e.length?3:n[e[t].kind]}function selectPattern(e,t){let n=splitPath(t),r=null,i=null;for(let t of e){let e=matchPattern(t,n);e!==null&&(r===null||isMoreSpecific(t.segments,r.segments))&&(r=t,i=e)}return r===null?null:{compiled:r,params:i}}function isMoreSpecific(e,t){let n=Math.max(e.length,t.length);for(let r=0;r<n;r+=1){let n=rankAt(e,r),i=rankAt(t,r);if(n!==i)return n>i}return!1}var Router=class{_routes=new Map;_listeners=new t;_started=!1;_mode;_base;_onHashChange=()=>this.handleHashChange();_onPopState=()=>this.handlePopState();constructor(e){this.applyOptions(e??{})}register(e,t){let n=compilePattern(e),r=this._routes.get(n.key);return r!==void 0&&r.pattern!==n.pattern&&console.warn(`Router: "${r.pattern}" and "${n.pattern}" have the same specificity; "${n.pattern}" replaces it.`),this._routes.set(n.key,{...n,handler:t}),this}start(){return this._started?(console.warn(`Router: start() called on an already-started router; ignoring.`),this):(this._started=!0,this.applyCurrentRoute(),this._mode===`history`?e.sink.addListener(e.source.getWindow(),`popstate`,this._onPopState):e.sink.addListener(e.source.getWindow(),`hashchange`,this._onHashChange),this)}stop(){return this._started?(this._mode===`history`?e.sink.removeListener(e.source.getWindow(),`popstate`,this._onPopState):e.sink.removeListener(e.source.getWindow(),`hashchange`,this._onHashChange),this._started=!1,this):this}navigate(t,n){let r=splitFragment(t);if(this._mode===`hash`){let t=`#/`+splitPath(normalizePath(r.path)).map(e=>encodeURIComponent(e)).join(`/`);return n?.replace===!0?e.sink.replaceLocationHash(t):e.sink.setLocationHash(t),this}let i=normalizePath(r.path),a=r.fragment;if(i===this.getPath()&&a===this.getFragment())return this;let o=this.getHref(a===``?i:`${i}#${a}`);return n?.replace===!0?e.sink.replaceHistoryPath(o):e.sink.pushHistoryPath(o),this.applyCurrentRoute(),this}getHref(e){let t=splitFragment(e),n=`/`+splitPath(normalizePath(t.path)).map(e=>encodeURIComponent(e)).join(`/`);if(this._mode===`hash`)return`#`+n;let r=joinBase(this._base,n);return t.fragment===``?r:`${r}#${t.fragment}`}getPath(t){if(this._mode===`hash`){let n=t??e.source.getLocationHash();return this.decodePath(normalizePath(n))}let n=t??e.source.getLocationPathname();return this.decodePath(stripBase(this._base,splitFragment(n).path))}getFragment(t){if(this._mode===`hash`)return``;if(t!==void 0)return splitFragment(t).fragment;let n=e.source.getLocationHash();return n.startsWith(`#`)?n.slice(1):n}decodePath(e){return`/`+splitPath(e).map(e=>{try{return decodeURIComponent(e)}catch{return e}}).join(`/`)}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)}applyCurrentRoute(){let e=this.getPath(),t=this.getFragment(),n=selectPattern(Array.from(this._routes.values()),e);if(n===null){this.emit(`nomatch`,e);return}let r={pattern:n.compiled.pattern,params:n.params,path:e,fragment:t};n.compiled.handler(n.params,e,t),this.emit(`navigate`,r)}applyOptions(e){if(this._mode=e.mode??`hash`,this._base=normalizeBase(e.base??`/`),e.routes!==void 0)for(let t of Object.keys(e.routes))this.register(t,e.routes[t]);if(e.listeners!==void 0)for(let t of Object.keys(e.listeners)){let n=e.listeners[t];n!==void 0&&this._listeners.add(t,n)}}handleHashChange(){this.applyCurrentRoute()}handlePopState(){this.applyCurrentRoute()}};export{Router};
|
|
2
2
|
//# sourceMappingURL=router.es.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./DOM-67StIm5G.js";import{t,u as n}from"./Component-DHqrPwAw.js";import{t as r}from"./VirtualScroller-zQr-vKrO.js";var i=2,VirtualRowView=class extends t{_rowPool=[];_boundIndices=[];_rowGeom=[];_rowDisplayed=[];_scroller=null;_renderDeferred=!1;_renderResumed=!1;_pendingScrollX=null;_pendingScrollY=null;_pendingScrollRow=null;initScroller(e){this._scroller=new r(this,e,()=>this.onScrollerTick());for(let e of this._scroller.ownedHandles())this.trackHandle(e)}onScrollerTick(){this.renderWindow()}destructor(){for(let e of this._rowPool)e.dispose();this._scroller?.dispose(),super.destructor()}setScrollX(e){return this._scroller?.resetWheelEase(),this.holdScrollWhileFirstLayoutHeld(`x`,e)||this._scroller?.setScrollX(e),this}setScrollY(e){return this._scroller?.resetWheelEase(),this.holdScrollWhileFirstLayoutHeld(`y`,e)||this._scroller?.setScrollY(e),this}holdScrollWhileFirstLayoutHeld(e,t){return n()?(e===`x`?this._pendingScrollX=t:(this._pendingScrollY=t,this._pendingScrollRow=null),!0):(e===`x`?this._pendingScrollX=null:(this._pendingScrollY=null,this._pendingScrollRow=null),!1)}applyPendingScroll(){let e=this._pendingScrollX,t=this._pendingScrollY,n=this._pendingScrollRow;this._pendingScrollX=null,this._pendingScrollY=null,this._pendingScrollRow=null,e!==null&&this.setScrollX(e),t!==null&&this.setScrollY(t),n!==null&&this.scrollRowIntoView(n)}computeVisibleWindow(e,t,n){let r=this.getRowHeight(),a=Math.max(0,Math.floor(e/r)-i),o=Math.min(n-1,Math.ceil((e+t)/r)+i);return{firstRow:a,lastRow:o,windowSize:o-a+1>0?o-a+1:0}}computePoolTarget(e,t,n){return Math.min(n,Math.max(e,Math.ceil(t/this.getRowHeight())+2*i+2))}computePageSize(){let e=this.getRowHeight();return Math.max(1,Math.floor((this.getHeight()||e)/e))}growRowPool(t){if(!this._scroller||this._rowPool.length>=t)return;let n=this._scroller.getRowsContainer(),r=e.sink.createDocumentFragment();for(;this._rowPool.length<t;){let t=this.createPoolRow(),n=t.getElement(!0);e.sink.appendChild(r,n),t.setY(0),t.setWillChange(`transform`),this._rowPool.push(t),this._boundIndices.push(-1),this._rowGeom.push(null),this._rowDisplayed.push(!1)}e.sink.appendChild(n,r),e.sink.release(r)}positionRow(e,t,n){let r=this._rowPool[e],i=this.getRowHeight(),a=this._rowGeom[e],o=!a||a.ty!==t||a.w!==n||a.h!==i;return o&&(r.setAutoCommitStyle(!1),r.setX(0),r.setTranslate(0,t),r.setWidth(n),r.setHeight(i),r.setAutoCommitStyle(!0),this._rowGeom[e]={ty:t,w:n,h:i}),this._rowDisplayed[e]||(r.setDisplayed(!0),this._rowDisplayed[e]=!0),o}hideExcessPoolRows(e){for(let t=e;t<this._rowPool.length;t++)this._rowDisplayed[t]&&(this._rowPool[t].setDisplayed(!1),this._rowDisplayed[t]=!1),this._boundIndices[t]=-1,this._rowGeom[t]=null}invalidateGeom(){for(let e=0;e<this._rowGeom.length;e++)this._rowGeom[e]=null}deferRenderWhileFirstLayoutHeld(){return n()?(this._renderDeferred=!0,this.scheduleLayout(),!0):(this._renderResumed=this._renderDeferred,this._renderDeferred=!1,!1)}wasRenderDeferred(){return this._renderDeferred}finishResumedRender(){let e=this._renderResumed;return this._renderResumed=!1,this.applyPendingScroll(),e}renderWindowIfDeferred(){return!this._renderDeferred||this.isLayoutPaused()?!1:(this.renderWindow(),!0)}onThemeReflow(){this._boundIndices.fill(-1),this.invalidateGeom(),this.renderWindow()}scrollRowIntoView(e){if(e<0||!this._scroller)return;if(n()){this._pendingScrollRow=e;return}let t=this.getRowHeight(),r=e*t,i=r+t,a=this._scroller.getScrollY(),o=this.getHeight(),s=a+o,c=a;r<a?c=r:i>s&&(c=i-o),c!==a&&this.setScrollY(c)}};function selectionsEqual(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}export{VirtualRowView as n,selectionsEqual as t};
|
|
2
|
+
//# sourceMappingURL=selectionsEqual-4r5R7pTK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionsEqual-4r5R7pTK.js","names":[],"sources":["../../src/typescript/lib/component/shared/VirtualRowView.ts","../../src/typescript/lib/component/shared/selectionsEqual.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { Component, ComponentOptions } from \"~/core/Component.js\";\nimport { DOM } from \"~/core/DOM.js\";\nimport type { Handle } from \"~/core/DOM.js\";\nimport { VirtualScroller } from \"~/component/container/VirtualScroller.js\";\nimport { isFirstLayoutHeld } from \"~/core/FirstLayoutGate.js\";\n\n/** Number of off-screen rows to render above and below the visible viewport. */\nconst SCROLL_BUFFER = 2;\n\n/**\n * Shared transform-windowed virtual-scroll base for the data views —\n * `table/Body` and `tree/Tree` are its only two subclasses. It owns the\n * recycled row pool (`_rowPool` and the parallel `_boundIndices` / `_rowGeom` /\n * `_rowDisplayed` bookkeeping arrays), the {@link VirtualScroller} wiring, and\n * the window / pool-growth / geometry reconciliation primitives each subclass's\n * render pass composes.\n *\n * Only two things genuinely diverge between the two consumers, so only those\n * are hooks:\n *\n * - **Row height** — `Body` derives it live from the theme line box; `Tree`\n * uses a fixed constant. Read through {@link getRowHeight} on every call so a\n * live theme change is honoured.\n * - **Row construction** — the pool-row scaffolding (fragment batching, `setY(0)`\n * pin, `will-change` promotion, parallel-array bookkeeping) is identical; only\n * the row object each subclass builds differs. {@link createPoolRow} returns a\n * fully-constructed, un-appended row and the base owns the rest.\n *\n * The per-frame render pass itself ({@link renderWindow}) stays subclass-specific\n * because the content-width derivation genuinely diverges; the base exposes the\n * shared primitives it calls ({@link computeVisibleWindow},\n * {@link computePoolTarget}, {@link growRowPool}, {@link positionRow},\n * {@link hideExcessPoolRows}).\n *\n * @typeParam TRow - The concrete pooled row component type.\n * @typeParam TOptions - The subclass's options bag.\n *\n * @internal Not barrel-exported; the two subclasses are the only consumers.\n */\nabstract class VirtualRowView<\n TRow extends Component,\n TOptions extends ComponentOptions = ComponentOptions,\n> extends Component<TOptions> {\n\n protected _rowPool : TRow[] = [];\n protected _boundIndices : number[] = [];\n protected _rowGeom : Array<{ ty: number, w: number, h: number } | null> = [];\n protected _rowDisplayed : boolean[] = [];\n protected _scroller : VirtualScroller | null = null;\n\n /** Whether the startup font gate skipped a render pass that still owes a run. */\n private _renderDeferred: boolean = false;\n /** Whether the render now in flight is the one a skipped pass left pending. */\n private _renderResumed : boolean = false;\n /** Scroll offsets the gate held back, applied once a render pass has run. */\n private _pendingScrollX: number | null = null;\n private _pendingScrollY: number | null = null;\n /** A row reveal the gate held back, recomputed once a render pass has run. */\n private _pendingScrollRow: number | null = null;\n\n /**\n * Returns the height in pixels of a single row. Read on every window /\n * geometry calculation, so a subclass that recomputes it (e.g. on a theme\n * change) reflects the new value immediately.\n */\n protected abstract getRowHeight(): number;\n\n /**\n * Constructs one pool row, fully wired but not yet appended to the\n * rows container — the base's {@link growRowPool} owns the append, the\n * `setY(0)` pin, the `will-change` promotion, and the parallel-array\n * bookkeeping.\n */\n protected abstract createPoolRow(): TRow;\n\n /**\n * Recomputes and reconciles the visible row window against the current\n * scroll position and dataset. Subclass-specific because the content-width\n * derivation diverges; both implementations compose the shared primitives\n * on this base.\n */\n protected abstract renderWindow(): void;\n\n /**\n * Constructs the {@link VirtualScroller} for this view and tracks its\n * container handles so they are released with the component. The scroller's\n * onScroll hook is routed through {@link onScrollerTick}.\n *\n * @param element - This view's initialised element handle.\n */\n protected initScroller(element: Handle): void {\n this._scroller = new VirtualScroller(this, element, () => this.onScrollerTick());\n\n // Track the scroller's created container handles so they are released\n // with this view (on destructor or GC); the scroller is not a Component.\n for (const handle of this._scroller.ownedHandles()) {\n this.trackHandle(handle);\n }\n }\n\n /**\n * Invoked on every scroller tick. Default behaviour re-renders the window;\n * `Body` overrides it to additionally emit its scroll events.\n */\n protected onScrollerTick(): void {\n this.renderWindow();\n }\n\n /**\n * Destroys the pooled rows and the scroller's overlay scrollbars before the\n * inherited teardown runs.\n *\n * {@link growRowPool} appends each row's element straight to the rows\n * container and keeps the row only in `_rowPool`, so a pooled row is never\n * registered as a child component and the base destructor's recursion over\n * `_components` cannot reach it. Without this override neither the rows nor\n * their cells (which *are* registered on their row) release their\n * per-instance stylesheet rules, so the shared sheet grows by roughly the\n * view's whole cell count on every teardown. The scroller's two\n * `Scrollbar` overlays are raw-appended the same way, so they need the\n * same explicit disposal.\n */\n protected destructor(): void {\n for (const row of this._rowPool) {\n row.dispose();\n }\n\n this._scroller?.dispose();\n\n super.destructor();\n }\n\n /**\n * Sets the JS-controlled horizontal scroll position. Delegates to the\n * underlying {@link VirtualScroller}.\n *\n * @param x - The new scroll position in pixels.\n */\n setScrollX(x: number): this {\n // Ahead of the hold: a programmatic scroll cancels an in-flight wheel\n // ease whether or not the offset itself has to wait.\n this._scroller?.resetWheelEase();\n\n if (this.holdScrollWhileFirstLayoutHeld(\"x\", x)) {\n return this;\n }\n\n this._scroller?.setScrollX(x);\n\n return this;\n }\n\n /**\n * Sets the JS-controlled vertical scroll position. Delegates to the\n * underlying {@link VirtualScroller}.\n *\n * @param y - The new scroll position in pixels.\n */\n setScrollY(y: number): this {\n // Ahead of the hold: a programmatic scroll cancels an in-flight wheel\n // ease whether or not the offset itself has to wait.\n this._scroller?.resetWheelEase();\n\n if (this.holdScrollWhileFirstLayoutHeld(\"y\", y)) {\n return this;\n }\n\n this._scroller?.setScrollY(y);\n\n return this;\n }\n\n /**\n * Holds a scroll offset set while the startup font gate is holding this\n * view's render pass, for {@link applyPendingScroll} to apply once the pass\n * has run.\n *\n * @param axis - Which offset is being set.\n * @param offset - The requested offset in pixels.\n *\n * @returns `true` when the caller must return without scrolling.\n *\n * @remarks The scroller clamps every offset against a content extent that\n * only the render pass publishes, so an offset set while that pass is\n * deferred clamps to 0 and the request is lost — a row revealed during\n * startup would end up selected but off-screen. This guards the offsets\n * that are viewport-independent and so can be replayed verbatim: the\n * table's `scrollToRecord`, and a consumer restoring a saved offset.\n * `scrollRowIntoView` is held one level higher instead, by row index, since\n * its target depends on a height the gate is also holding. The table's\n * `scrollColumnIntoView` has that same width dependence but fires only from\n * a pooled cell's editor, which cannot exist while the pass is deferred.\n */\n private holdScrollWhileFirstLayoutHeld(axis: \"x\" | \"y\", offset: number): boolean {\n if (!isFirstLayoutHeld()) {\n // This offset is being applied for real, so it supersedes anything\n // held for the same axis — otherwise the held one would replay on\n // the next render and revert it. A held row reveal is a vertical\n // request too, so it goes with the Y offset.\n if (axis === \"x\") {\n this._pendingScrollX = null;\n } else {\n this._pendingScrollY = null;\n this._pendingScrollRow = null;\n }\n\n return false;\n }\n\n if (axis === \"x\") {\n this._pendingScrollX = offset;\n } else {\n this._pendingScrollY = offset;\n this._pendingScrollRow = null;\n }\n\n return true;\n }\n\n /**\n * Applies the scroll offsets {@link holdScrollWhileFirstLayoutHeld} held\n * back, now that a render pass has published the content extent they clamp\n * against. A no-op once they are applied.\n */\n private applyPendingScroll(): void {\n const x = this._pendingScrollX;\n const y = this._pendingScrollY;\n const row = this._pendingScrollRow;\n\n this._pendingScrollX = null;\n this._pendingScrollY = null;\n this._pendingScrollRow = null;\n\n if (x !== null) {\n this.setScrollX(x);\n }\n\n if (y !== null) {\n this.setScrollY(y);\n }\n\n // Applied after the offsets, which is what makes a reveal win over a\n // raw offset held before it. The reverse order is handled the other\n // way: a raw offset set later clears the reveal outright, so the two\n // vertical requests always resolve to whichever came last.\n if (row !== null) {\n this.scrollRowIntoView(row);\n }\n }\n\n /**\n * Computes the `[firstRow, lastRow]` data-index window visible in the\n * current viewport, padded by `SCROLL_BUFFER` on each side and clamped to\n * the dataset bounds.\n *\n * @param scrollY - The current scroll offset in pixels.\n * @param visibleHeight - The viewport height in pixels.\n * @param totalRows - The total number of rows in the dataset.\n * @returns The `firstRow` / `lastRow` data indices and the number of rows in the window.\n */\n protected computeVisibleWindow(scrollY: number, visibleHeight: number, totalRows: number): { firstRow: number, lastRow: number, windowSize: number } {\n const rowHeight = this.getRowHeight();\n const firstRow = Math.max(0, Math.floor(scrollY / rowHeight) - SCROLL_BUFFER);\n const lastRow = Math.min(\n totalRows - 1,\n Math.ceil((scrollY + visibleHeight) / rowHeight) + SCROLL_BUFFER\n );\n const windowSize = lastRow - firstRow + 1 > 0 ? lastRow - firstRow + 1 : 0;\n\n return { firstRow, lastRow, windowSize };\n }\n\n /**\n * Computes the row-pool target size: the max possible window for the\n * current viewport, not just the current windowSize. windowSize shrinks\n * near the top/bottom edges of the dataset because firstRow clamps to 0\n * (and lastRow to totalRows-1); growing only to windowSize would force\n * regrowth mid-scroll once the user passes a viewport-edge boundary. Pre-\n * growing pays the per-row first-layout cost once.\n *\n * @param windowSize - The current visible-window size.\n * @param visibleHeight - The viewport height in pixels.\n * @param totalRows - The total number of rows in the dataset.\n * @returns The pool target size.\n */\n protected computePoolTarget(windowSize: number, visibleHeight: number, totalRows: number): number {\n return Math.min(\n totalRows,\n Math.max(\n windowSize,\n Math.ceil(visibleHeight / this.getRowHeight()) + 2 * SCROLL_BUFFER + 2\n )\n );\n }\n\n /**\n * Computes the number of whole rows a page-nav keystroke should move by:\n * one viewport height, floored to at least one row.\n *\n * @returns The page size in rows.\n */\n protected computePageSize(): number {\n const rowHeight = this.getRowHeight();\n\n return Math.max(1, Math.floor((this.getHeight() || rowHeight) / rowHeight));\n }\n\n /**\n * Grows the row pool up to `poolTarget`, batching new row elements through\n * a {@link DocumentFragment} so the live rows container sees a single\n * append instead of N. Each new slot pins its static top to 0, promotes it\n * to its own compositor layer, and extends the parallel bookkeeping arrays\n * in lockstep.\n *\n * @param poolTarget - The target pool size.\n */\n protected growRowPool(poolTarget: number): void {\n if (!this._scroller || this._rowPool.length >= poolTarget) {\n return;\n }\n\n const rowsContainer = this._scroller.getRowsContainer();\n const growFragment = DOM.sink.createDocumentFragment();\n\n while (this._rowPool.length < poolTarget) {\n const row = this.createPoolRow();\n const rowEl = row.getElement(true)!;\n\n DOM.sink.appendChild(growFragment, rowEl);\n\n // Pin row's static top to 0 once. Per-frame Y offset comes from\n // translateY, which is composite-only (avoids layout/paint per\n // scroll tick).\n row.setY(0);\n\n // Pre-promote pooled rows to their own compositor layer so the first\n // scroll-driven translate doesn't pay a layer-creation cost.\n row.setWillChange(\"transform\");\n\n this._rowPool.push(row);\n this._boundIndices.push(-1);\n this._rowGeom.push(null);\n this._rowDisplayed.push(false);\n }\n\n DOM.sink.appendChild(rowsContainer, growFragment);\n DOM.sink.release(growFragment);\n }\n\n /**\n * Positions the pool slot at `slot` to `targetY` and sizes it to `rowWidth`,\n * writing the translate/size only when the cached geometry differs from the\n * target, and toggling the row displayed on the false→true edge.\n *\n * @param slot - The pool-slot index.\n * @param targetY - The row's translate-Y offset in pixels.\n * @param rowWidth - The row's width in pixels.\n * @returns `true` when the geometry changed (the subclass may need to re-lay\n * out the row's children), `false` when it was already at the target.\n */\n protected positionRow(slot: number, targetY: number, rowWidth: number): boolean {\n const row = this._rowPool[slot];\n const rowHeight = this.getRowHeight();\n const prev = this._rowGeom[slot];\n const geomChanged = !prev || prev.ty !== targetY || prev.w !== rowWidth || prev.h !== rowHeight;\n\n if (geomChanged) {\n row.setAutoCommitStyle(false);\n row.setX(0);\n row.setTranslate(0, targetY);\n row.setWidth(rowWidth);\n row.setHeight(rowHeight);\n row.setAutoCommitStyle(true);\n this._rowGeom[slot] = { ty: targetY, w: rowWidth, h: rowHeight };\n }\n\n if (!this._rowDisplayed[slot]) {\n row.setDisplayed(true);\n this._rowDisplayed[slot] = true;\n }\n\n return geomChanged;\n }\n\n /**\n * Hides pool slots whose index falls outside the visible window and\n * clears their cached binding so the next bind triggers a full rebuild.\n *\n * @param windowSize - The number of pool slots currently in use.\n */\n protected hideExcessPoolRows(windowSize: number): void {\n for (let i = windowSize; i < this._rowPool.length; i++) {\n if (this._rowDisplayed[i]) {\n this._rowPool[i].setDisplayed(false);\n this._rowDisplayed[i] = false;\n }\n this._boundIndices[i] = -1;\n this._rowGeom[i] = null;\n }\n }\n\n /**\n * Clears the cached row geometry so the next render re-applies positions and\n * sizes for every slot. `Body` overrides this to additionally clear its\n * per-cell geometry cache.\n */\n protected invalidateGeom(): void {\n for (let i = 0; i < this._rowGeom.length; i++) {\n this._rowGeom[i] = null;\n }\n }\n\n /**\n * Skips a render pass while the startup font gate is held, arranging for it\n * to run once the gate opens.\n *\n * @returns `true` when the caller must return without rendering.\n *\n * @remarks Both subclasses call {@link renderWindow} from many synchronous\n * entry points — `init`, a data change, a selection move — so a row's\n * geometry is routinely committed outside the coalesced layout queue, and\n * `init` in particular commits it the moment the element exists. Holding the\n * queue therefore does not hold these views; they have to check the gate\n * themselves. Deferring at this one choke point covers every entry point at\n * once, rather than guarding each caller.\n */\n protected deferRenderWhileFirstLayoutHeld(): boolean {\n if (!isFirstLayoutHeld()) {\n // This render is going ahead, which satisfies anything a held pass\n // left pending — clearing it keeps a later layout from replaying a\n // startup-era pass over the fresher state this one just committed.\n // Note that it also took over that pass's unfinished business, so\n // flag it for `finishResumedRender` to pick up once it has rendered.\n this._renderResumed = this._renderDeferred;\n this._renderDeferred = false;\n\n return false;\n }\n\n this._renderDeferred = true;\n this.scheduleLayout();\n\n return true;\n }\n\n /**\n * Whether the last render pass on this view was skipped by the startup font\n * gate and is still waiting to run.\n *\n * @returns `true` while a pass is pending.\n */\n protected wasRenderDeferred(): boolean {\n return this._renderDeferred;\n }\n\n /**\n * Reports, once, that the render now finishing is the one a held pass left\n * pending — so the caller can redo the post-render work that pass skipped.\n *\n * @returns `true` exactly once per resumed pass, at the end of the render\n * that resumed it.\n *\n * @remarks Called at the tail of {@link renderWindow} rather than from a\n * layout hook because a render resumes from whichever entry point reaches\n * it first, and for the table body that is the parent table layout calling\n * `renderWindow` directly rather than anything going through `doLayout`.\n */\n protected finishResumedRender(): boolean {\n // Read and clear before applying the scroll: applying it re-enters\n // `renderWindow` through the scroller's onScroll hook, and that nested\n // pass resets this flag. Reading it afterwards would lose the caller's\n // post-render work on exactly the passes that carry both.\n const resumed = this._renderResumed;\n\n this._renderResumed = false;\n\n // This pass has published the content extent, so any held offset can be\n // applied now — whether or not the pass is itself the deferred one.\n this.applyPendingScroll();\n\n return resumed;\n }\n\n /**\n * Runs the render pass the startup font gate deferred, if one is pending.\n * Each subclass calls this from its own `doLayout`, which is what picks the\n * pass back up once the gate opens.\n *\n * @returns `true` when a deferred pass ran, so the caller can skip a render\n * of its own and refresh whatever it keeps in step with the rendered rows.\n *\n * @remarks A paused view keeps its pass pending rather than running it: a\n * parent's layout recursion reaches `Body.doLayout` regardless of the\n * child's pause state, so rendering here would defeat a `pauseLayout` the\n * caller asked for. (`Tree.doLayout` already returns early when paused, so\n * the guard only binds for the body.) `resumeLayout` runs a layout of its\n * own, which picks the pass up.\n */\n protected renderWindowIfDeferred(): boolean {\n if (!this._renderDeferred || this.isLayoutPaused()) {\n return false;\n }\n\n // The pending flag is left for `renderWindow`'s own gate check to\n // consume: that is what marks this render as the resumed one, which\n // `finishResumedRender` reads at the end of the pass.\n this.renderWindow();\n\n return true;\n }\n\n /**\n * Re-binds and re-renders every pooled row after a text-metrics reflow —\n * a theme change, or the web font swapping in over the fallback face.\n *\n * @remarks Pooled rows do not ride `ThemeManager`'s reflow for free. Both\n * subclasses render through renderers whose `Text` runs with\n * `setAutoMeasure(false)`, so a bound row only re-measures inside the\n * renderer's `update()` — which {@link renderWindow} skips for a slot that\n * is already bound to its data index. Without the `_boundIndices` reset a\n * visible row therefore keeps the width it measured against whichever font\n * was active when it was bound, clipping the wider glyphs of the real face\n * once it arrives. Subclasses that cache metrics-derived state of their own\n * (row height, content width) override this to refresh it, then chain up.\n */\n protected onThemeReflow(): void {\n this._boundIndices.fill(-1);\n this.invalidateGeom();\n this.renderWindow();\n }\n\n /**\n * Scrolls the view so the row at `index` is fully visible, without moving\n * the viewport unless necessary. Delegates through {@link VirtualScroller}\n * so the header translate + scrollbar thumb stay in sync.\n *\n * @param index - The data index of the row to reveal. A negative index is a\n * no-op (the row is not in the current view).\n */\n protected scrollRowIntoView(index: number): void {\n if (index < 0 || !this._scroller) {\n return;\n }\n\n // Hold the row, not a target. The target depends on this view's height,\n // and at startup that height arrives from the very layout the gate is\n // holding — so computing it now would either read an unset height and\n // reveal nothing, or read 0 and scroll the row just out of view.\n if (isFirstLayoutHeld()) {\n this._pendingScrollRow = index;\n\n return;\n }\n\n const rowHeight = this.getRowHeight();\n const top = index * rowHeight;\n const bottom = top + rowHeight;\n const scrollTop = this._scroller.getScrollY();\n const viewportHeight = this.getHeight();\n const visibleBottom = scrollTop + viewportHeight;\n\n let target = scrollTop;\n if (top < scrollTop) {\n target = top;\n } else if (bottom > visibleBottom) {\n target = bottom - viewportHeight;\n }\n if (target !== scrollTop) {\n this.setScrollY(target);\n }\n }\n}\n\nexport { VirtualRowView };\n","// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\n/**\n * Compares two selection sets by membership only — size and element\n * identity, regardless of insertion order.\n *\n * Pure; no DOM, no component state.\n *\n * @typeParam T - The selection identity type.\n * @param a - One selection set.\n * @param b - The other selection set.\n * @returns `true` when both sets have the same size and every member of\n * `a` is present in `b`.\n *\n * @internal Shared by `Tree` and `Body`; not barrel-exported.\n */\nexport function selectionsEqual<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): boolean {\n if (a.size !== b.size) {\n return false;\n }\n\n for (const item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n\n return true;\n}\n"],"mappings":"sIASA,IAAM,EAAgB,EAgCP,eAAf,cAGU,CAAoB,CAE1B,SAAgF,CAAC,EACjF,cAA+E,CAAC,EAChF,SAA+E,CAAC,EAChF,cAA+E,CAAC,EAChF,UAA+E,KAG/E,gBAAmC,GAEnC,eAAmC,GAEnC,gBAAyC,KACzC,gBAAyC,KAEzC,kBAA2C,KAgC3C,aAAuB,EAAuB,CAC1C,KAAK,UAAY,IAAI,EAAgB,KAAM,MAAe,KAAK,eAAe,CAAC,EAI/E,IAAK,IAAM,KAAU,KAAK,UAAU,aAAa,EAC7C,KAAK,YAAY,CAAM,CAE/B,CAMA,gBAAiC,CAC7B,KAAK,aAAa,CACtB,CAgBA,YAA6B,CACzB,IAAK,IAAM,KAAO,KAAK,SACnB,EAAI,QAAQ,EAGhB,KAAK,WAAW,QAAQ,EAExB,MAAM,WAAW,CACrB,CAQA,WAAW,EAAiB,CAWxB,OARA,KAAK,WAAW,eAAe,EAE3B,KAAK,+BAA+B,IAAK,CAAC,GAI9C,KAAK,WAAW,WAAW,CAAC,EAHjB,IAMf,CAQA,WAAW,EAAiB,CAWxB,OARA,KAAK,WAAW,eAAe,EAE3B,KAAK,+BAA+B,IAAK,CAAC,GAI9C,KAAK,WAAW,WAAW,CAAC,EAHjB,IAMf,CAuBA,+BAAuC,EAAiB,EAAyB,CAuB7E,OAtBK,EAAkB,GAenB,IAAS,IACT,KAAK,gBAAkB,GAEvB,KAAK,gBAAoB,EACzB,KAAK,kBAAoB,MAGtB,KAjBC,IAAS,IACT,KAAK,gBAAkB,MAEvB,KAAK,gBAAoB,KACzB,KAAK,kBAAoB,MAGtB,GAWf,CAOA,oBAAmC,CAC/B,IAAM,EAAM,KAAK,gBACX,EAAM,KAAK,gBACX,EAAM,KAAK,kBAEjB,KAAK,gBAAoB,KACzB,KAAK,gBAAoB,KACzB,KAAK,kBAAoB,KAErB,IAAM,MACN,KAAK,WAAW,CAAC,EAGjB,IAAM,MACN,KAAK,WAAW,CAAC,EAOjB,IAAQ,MACR,KAAK,kBAAkB,CAAG,CAElC,CAYA,qBAA+B,EAAiB,EAAuB,EAA8E,CACjJ,IAAM,EAAY,KAAK,aAAa,EAC9B,EAAY,KAAK,IAAI,EAAG,KAAK,MAAM,EAAU,CAAS,EAAI,CAAa,EACvE,EAAY,KAAK,IACnB,EAAY,EACZ,KAAK,MAAM,EAAU,GAAiB,CAAS,EAAI,CACvD,EAGA,MAAO,CAAE,WAAU,UAAS,WAFT,EAAU,EAAW,EAAI,EAAI,EAAU,EAAW,EAAI,CAElC,CAC3C,CAeA,kBAA4B,EAAoB,EAAuB,EAA2B,CAC9F,OAAO,KAAK,IACR,EACA,KAAK,IACD,EACA,KAAK,KAAK,EAAgB,KAAK,aAAa,CAAC,EAAI,EAAI,EAAgB,CACzE,CACJ,CACJ,CAQA,iBAAoC,CAChC,IAAM,EAAY,KAAK,aAAa,EAEpC,OAAO,KAAK,IAAI,EAAG,KAAK,OAAO,KAAK,UAAU,GAAK,GAAa,CAAS,CAAC,CAC9E,CAWA,YAAsB,EAA0B,CAC5C,GAAI,CAAC,KAAK,WAAa,KAAK,SAAS,QAAU,EAC3C,OAGJ,IAAM,EAAgB,KAAK,UAAU,iBAAiB,EAChD,EAAgB,EAAI,KAAK,uBAAuB,EAEtD,KAAO,KAAK,SAAS,OAAS,GAAY,CACtC,IAAM,EAAQ,KAAK,cAAc,EAC3B,EAAQ,EAAI,WAAW,EAAI,EAEjC,EAAI,KAAK,YAAY,EAAc,CAAK,EAKxC,EAAI,KAAK,CAAC,EAIV,EAAI,cAAc,WAAW,EAE7B,KAAK,SAAS,KAAK,CAAG,EACtB,KAAK,cAAc,KAAK,EAAE,EAC1B,KAAK,SAAS,KAAK,IAAI,EACvB,KAAK,cAAc,KAAK,EAAK,CACjC,CAEA,EAAI,KAAK,YAAY,EAAe,CAAY,EAChD,EAAI,KAAK,QAAQ,CAAY,CACjC,CAaA,YAAsB,EAAc,EAAiB,EAA2B,CAC5E,IAAM,EAAY,KAAK,SAAS,GAC1B,EAAY,KAAK,aAAa,EAC9B,EAAY,KAAK,SAAS,GAC1B,EAAc,CAAC,GAAQ,EAAK,KAAO,GAAW,EAAK,IAAM,GAAY,EAAK,IAAM,EAiBtF,OAfI,IACA,EAAI,mBAAmB,EAAK,EAC5B,EAAI,KAAK,CAAC,EACV,EAAI,aAAa,EAAG,CAAO,EAC3B,EAAI,SAAS,CAAQ,EACrB,EAAI,UAAU,CAAS,EACvB,EAAI,mBAAmB,EAAI,EAC3B,KAAK,SAAS,GAAQ,CAAE,GAAI,EAAS,EAAG,EAAU,EAAG,CAAU,GAG9D,KAAK,cAAc,KACpB,EAAI,aAAa,EAAI,EACrB,KAAK,cAAc,GAAQ,IAGxB,CACX,CAQA,mBAA6B,EAA0B,CACnD,IAAK,IAAI,EAAI,EAAY,EAAI,KAAK,SAAS,OAAQ,IAC3C,KAAK,cAAc,KACnB,KAAK,SAAS,EAAE,CAAC,aAAa,EAAK,EACnC,KAAK,cAAc,GAAK,IAE5B,KAAK,cAAc,GAAK,GACxB,KAAK,SAAS,GAAK,IAE3B,CAOA,gBAAiC,CAC7B,IAAK,IAAI,EAAI,EAAG,EAAI,KAAK,SAAS,OAAQ,IACtC,KAAK,SAAS,GAAK,IAE3B,CAgBA,iCAAqD,CAgBjD,OAfK,EAAkB,GAYvB,KAAK,gBAAkB,GACvB,KAAK,eAAe,EAEb,KATH,KAAK,eAAkB,KAAK,gBAC5B,KAAK,gBAAkB,GAEhB,GAOf,CAQA,mBAAuC,CACnC,OAAO,KAAK,eAChB,CAcA,qBAAyC,CAKrC,IAAM,EAAU,KAAK,eAQrB,MANA,MAAK,eAAiB,GAItB,KAAK,mBAAmB,EAEjB,CACX,CAiBA,wBAA4C,CAUxC,MATI,CAAC,KAAK,iBAAmB,KAAK,eAAe,EACtC,IAMX,KAAK,aAAa,EAEX,GACX,CAgBA,eAAgC,CAC5B,KAAK,cAAc,KAAK,EAAE,EAC1B,KAAK,eAAe,EACpB,KAAK,aAAa,CACtB,CAUA,kBAA4B,EAAqB,CAC7C,GAAI,EAAQ,GAAK,CAAC,KAAK,UACnB,OAOJ,GAAI,EAAkB,EAAG,CACrB,KAAK,kBAAoB,EAEzB,MACJ,CAEA,IAAM,EAAiB,KAAK,aAAa,EACnC,EAAiB,EAAQ,EACzB,EAAiB,EAAM,EACvB,EAAiB,KAAK,UAAU,WAAW,EAC3C,EAAiB,KAAK,UAAU,EAChC,EAAiB,EAAY,EAE/B,EAAS,EACT,EAAM,EACN,EAAS,EACF,EAAS,IAChB,EAAS,EAAS,GAElB,IAAW,GACX,KAAK,WAAW,CAAM,CAE9B,CACJ,EC7iBA,SAAgB,gBAAmB,EAAmB,EAA4B,CAC9E,GAAI,EAAE,OAAS,EAAE,KACb,MAAO,GAGX,IAAK,IAAM,KAAQ,EACf,GAAI,CAAC,EAAE,IAAI,CAAI,EACX,MAAO,GAIf,MAAO,EACX"}
|
|
@@ -2,7 +2,7 @@ import { Button, ButtonOptions } from "../../component/button/Button.js";
|
|
|
2
2
|
export interface TabCloseButtonOptions extends ButtonOptions {
|
|
3
3
|
}
|
|
4
4
|
declare class TabCloseButton extends Button<TabCloseButtonOptions> {
|
|
5
|
-
constructor(options?: TabCloseButtonOptions);
|
|
5
|
+
constructor(options?: TabCloseButtonOptions, subclassDefaults?: Partial<TabCloseButtonOptions>);
|
|
6
6
|
}
|
|
7
7
|
declare const TabCloseButtonCallable: import("../../core/Callable.js").Callable<typeof TabCloseButton>;
|
|
8
8
|
type TabCloseButtonCallable = TabCloseButton;
|
|
@@ -23,7 +23,7 @@ declare class CollapseButton extends Component<CollapseButtonOptions> {
|
|
|
23
23
|
protected emit(event: CollapseButtonEvent): void;
|
|
24
24
|
private onDoubleClick;
|
|
25
25
|
private onMouseDown;
|
|
26
|
-
|
|
26
|
+
protected destructor(): void;
|
|
27
27
|
}
|
|
28
28
|
declare const CollapseButtonCallable: import("../../core/Callable.js").Callable<typeof CollapseButton>;
|
|
29
29
|
type CollapseButtonCallable = CollapseButton;
|
|
@@ -3,7 +3,7 @@ import { Event } from "../../core/Event.js";
|
|
|
3
3
|
interface DialogBackdropOptions extends ComponentOptions {
|
|
4
4
|
}
|
|
5
5
|
declare class DialogBackdrop extends Component<DialogBackdropOptions> {
|
|
6
|
-
constructor(options?: DialogBackdropOptions);
|
|
6
|
+
constructor(options?: DialogBackdropOptions, subclassDefaults?: Partial<DialogBackdropOptions>);
|
|
7
7
|
addClickListener(listener: Event.Listener): this;
|
|
8
8
|
resize(): void;
|
|
9
9
|
destroy(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
|
+
import { BorderOptions } from "../../primitive/Border.js";
|
|
2
3
|
export interface MenuItemOptions extends ComponentOptions {
|
|
3
4
|
text?: string;
|
|
4
5
|
enabled?: boolean;
|
|
@@ -58,6 +59,9 @@ declare class MenuItem extends Component {
|
|
|
58
59
|
activate(): void;
|
|
59
60
|
protected destructor(): void;
|
|
60
61
|
getBaseline(): number | null;
|
|
62
|
+
private updateLabelHeights;
|
|
63
|
+
setBorder(options: BorderOptions | string): this;
|
|
64
|
+
clearBorder(): this;
|
|
61
65
|
doLayout(): this;
|
|
62
66
|
}
|
|
63
67
|
declare const MenuItemCallable: import("../../core/Callable.js").Callable<typeof MenuItem>;
|
|
@@ -4,7 +4,7 @@ export interface MenuSeparatorOptions extends ComponentOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare class MenuSeparator extends Component<MenuSeparatorOptions> {
|
|
6
6
|
static readonly HEIGHT: number;
|
|
7
|
-
constructor(cssVarPrefix?: MenuItemCSSVarPrefix, options?: MenuSeparatorOptions);
|
|
7
|
+
constructor(cssVarPrefix?: MenuItemCSSVarPrefix, options?: MenuSeparatorOptions, subclassDefaults?: Partial<MenuSeparatorOptions>);
|
|
8
8
|
}
|
|
9
9
|
declare const MenuSeparatorCallable: import("../../core/Callable.js").Callable<typeof MenuSeparator>;
|
|
10
10
|
type MenuSeparatorCallable = MenuSeparator;
|
|
@@ -27,7 +27,7 @@ declare class SplitGutter extends Component<SplitGutterOptions> {
|
|
|
27
27
|
private _expandedBackground;
|
|
28
28
|
private _tooltipText;
|
|
29
29
|
private _listeners;
|
|
30
|
-
constructor(direction: String, options?: SplitGutterOptions);
|
|
30
|
+
constructor(direction: String, options?: SplitGutterOptions, subclassDefaults?: Partial<SplitGutterOptions>);
|
|
31
31
|
protected init(element?: Handle): this;
|
|
32
32
|
isCollapsible(): boolean;
|
|
33
33
|
setCollapsible(value: boolean): this;
|
|
@@ -50,7 +50,7 @@ declare class SplitGutter extends Component<SplitGutterOptions> {
|
|
|
50
50
|
protected emit(event: "drag", position: number): void;
|
|
51
51
|
protected emit(event: "dragend"): void;
|
|
52
52
|
protected emit(event: "collapse"): void;
|
|
53
|
-
|
|
53
|
+
protected destructor(): void;
|
|
54
54
|
private _dispatchDrag;
|
|
55
55
|
onDragStart(evnt: MouseEvent): void;
|
|
56
56
|
onDragStop(): Event.ListenerResult;
|
|
@@ -11,7 +11,7 @@ declare class StatusBar extends Container<StatusBarOptions> {
|
|
|
11
11
|
private _messageTimer;
|
|
12
12
|
private _messageText;
|
|
13
13
|
private _spacer;
|
|
14
|
-
constructor(options?: StatusBarOptions);
|
|
14
|
+
constructor(options?: StatusBarOptions, subclassDefaults?: Partial<StatusBarOptions>);
|
|
15
15
|
protected applyOptions(options: StatusBarOptions): this;
|
|
16
16
|
addLeft(component: Component): this;
|
|
17
17
|
addRight(component: Component): this;
|
|
@@ -16,6 +16,7 @@ export declare class VirtualScroller {
|
|
|
16
16
|
private _shadowOverlay;
|
|
17
17
|
private _shadowEdges;
|
|
18
18
|
constructor(owner: Component, element: Handle, onScroll: VirtualScrollerOnScroll);
|
|
19
|
+
dispose(): void;
|
|
19
20
|
ownedHandles(): readonly Handle[];
|
|
20
21
|
getRowsContainer(): Handle;
|
|
21
22
|
getScrollY(): number;
|
|
@@ -25,7 +25,7 @@ declare class WindowBorder extends Component<WindowBorderOptions> {
|
|
|
25
25
|
private _snapTarget;
|
|
26
26
|
private _snapTargetStyleRule?;
|
|
27
27
|
private get snapTargetStyleRule();
|
|
28
|
-
constructor(direction: Direction, options?: WindowBorderOptions);
|
|
28
|
+
constructor(direction: Direction, options?: WindowBorderOptions, subclassDefaults?: Partial<WindowBorderOptions>);
|
|
29
29
|
getDirection(): Direction;
|
|
30
30
|
setDirection(direction: Direction): this;
|
|
31
31
|
on(event: "drag", listener: (border: WindowBorder, e: MouseEvent) => void): this;
|
|
@@ -12,7 +12,7 @@ declare class DiagramNode extends Panel<DiagramNodeOptions> {
|
|
|
12
12
|
private _badge?;
|
|
13
13
|
private _selectedStyleRule?;
|
|
14
14
|
private get selectedStyleRule();
|
|
15
|
-
constructor(options?: DiagramNodeOptions);
|
|
15
|
+
constructor(options?: DiagramNodeOptions, subclassDefaults?: Partial<DiagramNodeOptions>);
|
|
16
16
|
protected applyOptions(options: DiagramNodeOptions): this;
|
|
17
17
|
private buildContent;
|
|
18
18
|
setLabel(value: string): this;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
2
|
import type { Handle } from "../../core/DOM.js";
|
|
3
|
-
export type CanvasDrawCallback = (ctx: CanvasRenderingContext2D, width: number, height: number) => void;
|
|
3
|
+
export type CanvasDrawCallback = (ctx: CanvasRenderingContext2D, width: number, height: number, elapsedMs: number) => void;
|
|
4
4
|
export interface CanvasOptions extends ComponentOptions {
|
|
5
5
|
onDraw?: CanvasDrawCallback;
|
|
6
6
|
animateWhenHidden?: boolean;
|
|
7
|
+
maxFps?: number;
|
|
7
8
|
}
|
|
8
9
|
declare class Canvas extends Component<CanvasOptions> {
|
|
9
10
|
private _ctx;
|
|
10
11
|
private _rafId;
|
|
12
|
+
private _animationStartMs;
|
|
13
|
+
private _lastDrawMs;
|
|
14
|
+
private _elapsedMs;
|
|
11
15
|
private _animationRequested;
|
|
12
16
|
private _syncedWidth;
|
|
13
17
|
private _syncedHeight;
|
|
14
18
|
private _syncedDpr;
|
|
15
19
|
private _dprToken;
|
|
16
|
-
constructor(options?: CanvasOptions);
|
|
20
|
+
constructor(options?: CanvasOptions, subclassDefaults?: Partial<CanvasOptions>);
|
|
17
21
|
protected applyOptions(options: CanvasOptions): this;
|
|
18
22
|
getContext(): CanvasRenderingContext2D | null;
|
|
19
23
|
setOnDraw(handler: CanvasDrawCallback | null): this;
|
|
@@ -23,6 +27,8 @@ declare class Canvas extends Component<CanvasOptions> {
|
|
|
23
27
|
stopAnimation(): this;
|
|
24
28
|
isAnimating(): boolean;
|
|
25
29
|
setAnimateWhenHidden(value: boolean): this;
|
|
30
|
+
setMaxFps(fps: number): this;
|
|
31
|
+
getMaxFps(): number;
|
|
26
32
|
getAnimateWhenHidden(): boolean;
|
|
27
33
|
protected syncBackingStore(): void;
|
|
28
34
|
doLayout(): this;
|
|
@@ -18,7 +18,7 @@ declare class Glyph extends Component<GlyphOptions> {
|
|
|
18
18
|
private _animatedRef;
|
|
19
19
|
static register(...defs: NamedGlyphDef[]): void;
|
|
20
20
|
static unregister(name: string): void;
|
|
21
|
-
constructor(name: string, options?: GlyphOptions);
|
|
21
|
+
constructor(name: string, options?: GlyphOptions, subclassDefaults?: Partial<GlyphOptions>);
|
|
22
22
|
setPreferredSize(size: Size): this;
|
|
23
23
|
getBaseline(): number | null;
|
|
24
24
|
getGlyphName(): string;
|
|
@@ -31,6 +31,7 @@ declare class Glyph extends Component<GlyphOptions> {
|
|
|
31
31
|
getAnimated(): GlyphAnimation | null;
|
|
32
32
|
setAnimated(kind: GlyphAnimation | null): this;
|
|
33
33
|
clearAnimated(): this;
|
|
34
|
+
protected onEffectiveVisibilityChange(effective: boolean): void;
|
|
34
35
|
getAnimationDuration(): number;
|
|
35
36
|
setAnimationDuration(ms: number): this;
|
|
36
37
|
_syncReducedMotion(): void;
|
|
@@ -4,7 +4,7 @@ export interface HeaderOptions extends TextOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare class Header<TOptions extends HeaderOptions = HeaderOptions> extends Container<TOptions> {
|
|
6
6
|
private _text;
|
|
7
|
-
constructor(text: string, options?: TOptions);
|
|
7
|
+
constructor(text: string, options?: TOptions, subclassDefaults?: Partial<TOptions>);
|
|
8
8
|
protected applyOptions(options: TOptions): this;
|
|
9
9
|
protected updatePreferredSize(): void;
|
|
10
10
|
getText(): Text;
|
|
@@ -10,7 +10,7 @@ export interface IconLabelOptions extends ComponentOptions {
|
|
|
10
10
|
declare class IconLabel extends Component<IconLabelOptions> {
|
|
11
11
|
private _glyph;
|
|
12
12
|
private _label;
|
|
13
|
-
constructor(glyph: string, text: string, forId: string, options?: IconLabelOptions);
|
|
13
|
+
constructor(glyph: string, text: string, forId: string, options?: IconLabelOptions, subclassDefaults?: Partial<IconLabelOptions>);
|
|
14
14
|
protected applyOptions(options: IconLabelOptions): this;
|
|
15
15
|
setGlyph(name: string): this;
|
|
16
16
|
setText(text: string): this;
|
|
@@ -9,7 +9,7 @@ export interface IconTextOptions extends ComponentOptions {
|
|
|
9
9
|
declare class IconText extends Component<IconTextOptions> {
|
|
10
10
|
private _glyph;
|
|
11
11
|
private _text;
|
|
12
|
-
constructor(glyph: string, text: string, options?: IconTextOptions);
|
|
12
|
+
constructor(glyph: string, text: string, options?: IconTextOptions, subclassDefaults?: Partial<IconTextOptions>);
|
|
13
13
|
protected applyOptions(options: IconTextOptions): this;
|
|
14
14
|
setGlyph(name: string): this;
|
|
15
15
|
setText(text: string): this;
|
|
@@ -5,7 +5,7 @@ export interface ImageOptions extends ComponentOptions {
|
|
|
5
5
|
}
|
|
6
6
|
declare class Image extends Component<ImageOptions> {
|
|
7
7
|
private _src;
|
|
8
|
-
constructor(src: String, options?: ImageOptions);
|
|
8
|
+
constructor(src: String, options?: ImageOptions, subclassDefaults?: Partial<ImageOptions>);
|
|
9
9
|
getElement(createIfMissing?: boolean): Handle | undefined;
|
|
10
10
|
getPreferredSize(): Size | null;
|
|
11
11
|
getMinSize(): Size | null;
|
|
@@ -24,7 +24,7 @@ export interface VideoOptions extends ComponentOptions {
|
|
|
24
24
|
declare class Video extends Component<VideoOptions> {
|
|
25
25
|
private _listeners;
|
|
26
26
|
private readonly _mediaHandlers;
|
|
27
|
-
constructor(options?: VideoOptions);
|
|
27
|
+
constructor(options?: VideoOptions, subclassDefaults?: Partial<VideoOptions>);
|
|
28
28
|
protected applyOptions(options: VideoOptions): this;
|
|
29
29
|
getSrc(): string | null;
|
|
30
30
|
setSrc(src: string): this;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
2
|
import type { Handle } from "../../core/DOM.js";
|
|
3
3
|
export type WebGLContextInitCallback = (gl: WebGL2RenderingContext) => void;
|
|
4
|
-
export type WebGLFrameCallback = (gl: WebGL2RenderingContext, width: number, height: number) => void;
|
|
4
|
+
export type WebGLFrameCallback = (gl: WebGL2RenderingContext, width: number, height: number, elapsedMs: number) => void;
|
|
5
5
|
export interface WebGLCanvasOptions extends ComponentOptions {
|
|
6
6
|
onContextInit?: WebGLContextInitCallback;
|
|
7
7
|
onFrame?: WebGLFrameCallback;
|
|
8
8
|
animateWhenHidden?: boolean;
|
|
9
|
+
maxFps?: number;
|
|
9
10
|
}
|
|
10
11
|
declare class WebGLCanvas extends Component<WebGLCanvasOptions> {
|
|
11
12
|
private _gl;
|
|
12
13
|
private _rafId;
|
|
14
|
+
private _animationStartMs;
|
|
15
|
+
private _lastDrawMs;
|
|
16
|
+
private _elapsedMs;
|
|
13
17
|
private _animationRequested;
|
|
14
18
|
private _contextLost;
|
|
15
19
|
private _contextInitialised;
|
|
@@ -17,7 +21,7 @@ declare class WebGLCanvas extends Component<WebGLCanvasOptions> {
|
|
|
17
21
|
private _syncedHeight;
|
|
18
22
|
private _syncedDpr;
|
|
19
23
|
private _dprToken;
|
|
20
|
-
constructor(options?: WebGLCanvasOptions);
|
|
24
|
+
constructor(options?: WebGLCanvasOptions, subclassDefaults?: Partial<WebGLCanvasOptions>);
|
|
21
25
|
protected applyOptions(options: WebGLCanvasOptions): this;
|
|
22
26
|
getContext(): WebGL2RenderingContext | null;
|
|
23
27
|
setOnContextInit(handler: WebGLContextInitCallback | null): this;
|
|
@@ -29,6 +33,8 @@ declare class WebGLCanvas extends Component<WebGLCanvasOptions> {
|
|
|
29
33
|
isAnimating(): boolean;
|
|
30
34
|
setAnimateWhenHidden(value: boolean): this;
|
|
31
35
|
getAnimateWhenHidden(): boolean;
|
|
36
|
+
setMaxFps(fps: number): this;
|
|
37
|
+
getMaxFps(): number;
|
|
32
38
|
protected syncBackingStore(): void;
|
|
33
39
|
doLayout(): this;
|
|
34
40
|
protected render(): Handle;
|
|
@@ -22,7 +22,7 @@ declare class CodeEditor extends Component<CodeEditorOptions> {
|
|
|
22
22
|
private readonly _listeners;
|
|
23
23
|
private readonly _unsubscribeTheme;
|
|
24
24
|
private _scrollElement;
|
|
25
|
-
constructor(value?: string, options?: CodeEditorOptions);
|
|
25
|
+
constructor(value?: string, options?: CodeEditorOptions, subclassDefaults?: Partial<CodeEditorOptions>);
|
|
26
26
|
protected applyOptions(options: CodeEditorOptions): this;
|
|
27
27
|
getValue(): string;
|
|
28
28
|
setValue(value: string): this;
|
|
@@ -15,7 +15,7 @@ declare abstract class AbstractPickerField<TValue, TDropdown extends AnimatedDro
|
|
|
15
15
|
protected _value: TValue | null;
|
|
16
16
|
protected _invalid: boolean;
|
|
17
17
|
protected _showSeconds: boolean;
|
|
18
|
-
constructor(options?:
|
|
18
|
+
constructor(options?: AbstractPickerFieldOptions, subclassDefaults?: Partial<AbstractPickerFieldOptions>);
|
|
19
19
|
protected abstract formatValue(value: TValue): string;
|
|
20
20
|
protected abstract parseRaw(raw: string): TValue | null;
|
|
21
21
|
protected abstract createDropdown(): TDropdown;
|
|
@@ -7,7 +7,7 @@ declare class AutoCompleteDropdown extends AnimatedDropdown<AutoCompleteDropdown
|
|
|
7
7
|
private readonly _list;
|
|
8
8
|
private readonly _onSelect;
|
|
9
9
|
private readonly _onHide;
|
|
10
|
-
constructor(onSelect: (value: string) => void, onHide: () => void, options?: AutoCompleteDropdownOptions);
|
|
10
|
+
constructor(onSelect: (value: string) => void, onHide: () => void, options?: AutoCompleteDropdownOptions, subclassDefaults?: Partial<AutoCompleteDropdownOptions>);
|
|
11
11
|
show(anchorEl: Handle, suggestions: string[]): this;
|
|
12
12
|
hide(): this;
|
|
13
13
|
handleKey(e: KeyboardEvent): boolean;
|
|
@@ -8,7 +8,7 @@ export interface LinkOptions extends TextOptions {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
declare class Link extends Text<LinkOptions> {
|
|
11
|
-
constructor(text?: String, options?: LinkOptions);
|
|
11
|
+
constructor(text?: String, options?: LinkOptions, subclassDefaults?: Partial<LinkOptions>);
|
|
12
12
|
protected applyOptions(options: LinkOptions): this;
|
|
13
13
|
isInteractive(): boolean;
|
|
14
14
|
setInteractive(value: boolean): this;
|
|
@@ -11,7 +11,7 @@ declare class NumberSpinner extends AbstractInput<number, NumberSpinnerOptions>
|
|
|
11
11
|
private _upBtn;
|
|
12
12
|
private _downBtn;
|
|
13
13
|
private _btnBox;
|
|
14
|
-
constructor(options?: NumberSpinnerOptions);
|
|
14
|
+
constructor(options?: NumberSpinnerOptions, subclassDefaults?: Partial<NumberSpinnerOptions>);
|
|
15
15
|
protected applyOptions(options: NumberSpinnerOptions): this;
|
|
16
16
|
getBaseline(): number | null;
|
|
17
17
|
private updateHeight;
|
|
@@ -3,7 +3,7 @@ export interface PasswordFieldOptions extends TextInputOptions {
|
|
|
3
3
|
newPassword?: boolean;
|
|
4
4
|
}
|
|
5
5
|
declare class PasswordField extends TextInput<PasswordFieldOptions> {
|
|
6
|
-
constructor(options?: PasswordFieldOptions);
|
|
6
|
+
constructor(options?: PasswordFieldOptions, subclassDefaults?: Partial<PasswordFieldOptions>);
|
|
7
7
|
private updateHeight;
|
|
8
8
|
}
|
|
9
9
|
declare const PasswordFieldCallable: import("../../core/Callable.js").Callable<typeof PasswordField>;
|
|
@@ -9,7 +9,7 @@ export interface SpinButtonOptions extends ButtonOptions {
|
|
|
9
9
|
declare class SpinButton extends Button<SpinButtonOptions> {
|
|
10
10
|
private _listeners;
|
|
11
11
|
private _repeat;
|
|
12
|
-
constructor(symbol: "▲" | "▼", options?: SpinButtonOptions);
|
|
12
|
+
constructor(symbol: "▲" | "▼", options?: SpinButtonOptions, subclassDefaults?: Partial<SpinButtonOptions>);
|
|
13
13
|
private updateSize;
|
|
14
14
|
on(event: "action", listener: ClickListener): this;
|
|
15
15
|
on(event: "tick", listener: () => void): this;
|
|
@@ -6,7 +6,7 @@ export interface TextAreaOptions extends TextInputOptions {
|
|
|
6
6
|
wrap?: string;
|
|
7
7
|
}
|
|
8
8
|
declare class TextArea extends TextInput<TextAreaOptions> {
|
|
9
|
-
constructor(text?: string, options?: TextAreaOptions);
|
|
9
|
+
constructor(text?: string, options?: TextAreaOptions, subclassDefaults?: Partial<TextAreaOptions>);
|
|
10
10
|
protected applyOptions(options: TextAreaOptions): this;
|
|
11
11
|
getRows(): number | null;
|
|
12
12
|
setRows(value: number): this;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { TextInput, TextInputOptions } from "../../component/input/TextInput.js";
|
|
2
|
+
import { BorderOptions } from "../../primitive/Border.js";
|
|
2
3
|
export interface TextFieldOptions extends TextInputOptions {
|
|
3
4
|
}
|
|
4
5
|
declare class TextField extends TextInput<TextFieldOptions> {
|
|
5
|
-
constructor(options?: TextFieldOptions);
|
|
6
|
+
constructor(options?: TextFieldOptions, subclassDefaults?: Partial<TextFieldOptions>);
|
|
6
7
|
private updateHeight;
|
|
8
|
+
setBorder(options: BorderOptions | string): this;
|
|
7
9
|
}
|
|
8
10
|
declare const TextFieldCallable: import("../../core/Callable.js").Callable<typeof TextField>;
|
|
9
11
|
type TextFieldCallable = TextField;
|
|
@@ -3,7 +3,7 @@ export interface UsernameFieldOptions extends TextInputOptions {
|
|
|
3
3
|
email?: boolean;
|
|
4
4
|
}
|
|
5
5
|
declare class UsernameField extends TextInput<UsernameFieldOptions> {
|
|
6
|
-
constructor(options?: UsernameFieldOptions);
|
|
6
|
+
constructor(options?: UsernameFieldOptions, subclassDefaults?: Partial<UsernameFieldOptions>);
|
|
7
7
|
private updateHeight;
|
|
8
8
|
}
|
|
9
9
|
declare const UsernameFieldCallable: import("../../core/Callable.js").Callable<typeof UsernameField>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
1
|
+
import { Comparator, Component, ComponentOptions } from "../../core/Component.js";
|
|
2
2
|
import { LayoutConstraints } from "../../layout/LayoutConstraints.js";
|
|
3
3
|
import { BulletedListItemStyle } from "../../component/list/BulletedListItemStyle.js";
|
|
4
4
|
import { NumberedListItemStyle } from "../../component/list/NumberedListItemStyle.js";
|
|
@@ -8,10 +8,18 @@ export interface AbstractMarkerListOptions<U extends BulletedListItemStyle | Num
|
|
|
8
8
|
}
|
|
9
9
|
export declare abstract class AbstractMarkerList<U extends BulletedListItemStyle | NumberedListItemStyle> extends Component<AbstractMarkerListOptions<U>> {
|
|
10
10
|
private _style;
|
|
11
|
+
private _markerColumnWidth;
|
|
11
12
|
constructor(tag: string, style: U, options?: AbstractMarkerListOptions<U>, subclassDefaults?: Partial<AbstractMarkerListOptions<U>>);
|
|
12
13
|
protected applyOptions(options: AbstractMarkerListOptions<U>): this;
|
|
13
14
|
getStyle(): U | undefined;
|
|
14
15
|
setStyle(style: U): this;
|
|
16
|
+
getMarkerColumnWidth(): number;
|
|
17
|
+
doLayout(): this;
|
|
18
|
+
protected syncMarkerColumn(): void;
|
|
19
|
+
protected abstract markerText(index: number): string;
|
|
20
|
+
protected renumber(): void;
|
|
15
21
|
addComponent(component: ListItem, constraints?: LayoutConstraints): this;
|
|
22
|
+
insertComponent(component: ListItem, index: number, constraints?: LayoutConstraints): this;
|
|
16
23
|
removeComponent(component: ListItem): LayoutConstraints | undefined;
|
|
24
|
+
sortComponents(comparator: Comparator<Component, Component> | undefined): this;
|
|
17
25
|
}
|
|
@@ -4,6 +4,7 @@ export interface BulletedListOptions extends AbstractMarkerListOptions<BulletedL
|
|
|
4
4
|
}
|
|
5
5
|
declare class BulletedList extends AbstractMarkerList<BulletedListItemStyle> {
|
|
6
6
|
constructor(options?: BulletedListOptions);
|
|
7
|
+
protected markerText(_index: number): string;
|
|
7
8
|
}
|
|
8
9
|
declare const BulletedListCallable: import("../../core/Callable.js").Callable<typeof BulletedList>;
|
|
9
10
|
type BulletedListCallable = BulletedList;
|
|
@@ -4,12 +4,18 @@ export interface ListItemOptions extends ComponentOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare class ListItem extends Component<ListItemOptions> {
|
|
6
6
|
private _key;
|
|
7
|
-
private
|
|
8
|
-
|
|
7
|
+
private _marker;
|
|
8
|
+
private _text;
|
|
9
|
+
constructor(key: string, value: string, options?: ListItemOptions, subclassDefaults?: Partial<ListItemOptions>);
|
|
9
10
|
protected applyOptions(options: ListItemOptions): this;
|
|
10
|
-
applyStyle(): this;
|
|
11
11
|
getKey(): string;
|
|
12
|
-
|
|
12
|
+
getText(): string;
|
|
13
|
+
setText(text: string): this;
|
|
14
|
+
getMarker(): string;
|
|
15
|
+
setMarker(text: string): this;
|
|
16
|
+
getMarkerWidth(): number;
|
|
17
|
+
setMarkerColumnWidth(width: number): this;
|
|
18
|
+
protected render(): import("../../core/DOM.js").Handle;
|
|
13
19
|
}
|
|
14
20
|
declare const ListItemCallable: import("../../core/Callable.js").Callable<typeof ListItem>;
|
|
15
21
|
type ListItemCallable = ListItem;
|
|
@@ -4,6 +4,7 @@ export interface NumberedListOptions extends AbstractMarkerListOptions<NumberedL
|
|
|
4
4
|
}
|
|
5
5
|
declare class NumberedList extends AbstractMarkerList<NumberedListItemStyle> {
|
|
6
6
|
constructor(options?: NumberedListOptions);
|
|
7
|
+
protected markerText(index: number): string;
|
|
7
8
|
}
|
|
8
9
|
declare const NumberedListCallable: import("../../core/Callable.js").Callable<typeof NumberedList>;
|
|
9
10
|
type NumberedListCallable = NumberedList;
|
|
@@ -5,7 +5,7 @@ export declare const MENU_BAR_BUTTON_HEIGHT: number;
|
|
|
5
5
|
declare class MenuBarButton extends Button<MenuBarButtonOptions> {
|
|
6
6
|
private readonly _onClickHandler;
|
|
7
7
|
private readonly _onMouseOverHandler;
|
|
8
|
-
constructor(text: string, onClick: () => void, onHover: () => void, options?: MenuBarButtonOptions);
|
|
8
|
+
constructor(text: string, onClick: () => void, onHover: () => void, options?: MenuBarButtonOptions, subclassDefaults?: Partial<MenuBarButtonOptions>);
|
|
9
9
|
protected computePreferredSize(): {
|
|
10
10
|
width: number;
|
|
11
11
|
height: number;
|
|
@@ -21,7 +21,7 @@ declare class ToolBar<TOptions extends ToolBarOptions = ToolBarOptions> extends
|
|
|
21
21
|
private _overflowButton;
|
|
22
22
|
private _overflowMenu;
|
|
23
23
|
private _overflowSpacer;
|
|
24
|
-
constructor(options?: ToolBarOptions);
|
|
24
|
+
constructor(options?: ToolBarOptions, subclassDefaults?: Partial<ToolBarOptions>);
|
|
25
25
|
protected applyOptions(options: TOptions): this;
|
|
26
26
|
setOrientation(value: AxisOrientation): this;
|
|
27
27
|
getOrientation(): AxisOrientation;
|
|
@@ -6,7 +6,7 @@ export interface ToolBarSeparatorOptions extends ComponentOptions {
|
|
|
6
6
|
declare class ToolBarSeparator extends Component<ToolBarSeparatorOptions> {
|
|
7
7
|
static readonly THICKNESS: number;
|
|
8
8
|
private readonly _orientation;
|
|
9
|
-
constructor(options?: ToolBarSeparatorOptions);
|
|
9
|
+
constructor(options?: ToolBarSeparatorOptions, subclassDefaults?: Partial<ToolBarSeparatorOptions>);
|
|
10
10
|
getOrientation(): AxisOrientation;
|
|
11
11
|
}
|
|
12
12
|
declare const ToolBarSeparatorCallable: import("../../core/Callable.js").Callable<typeof ToolBarSeparator>;
|